home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-10-25 | 295.6 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Oct 13 13:38:01 1994, modified Tue Oct 25 04:29:33 1994, creator 'HLX2', type 'ONLN', 295512 bytes "Color Manager" , at 0x482d8 7026 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 43 6f 6c 6f 72 20 | 4d 61 6e 61 67 65 72 00 |..Color |Manager.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 04 82 58 00 | 00 1b 72 aa c3 20 f9 aa |......X.|..r.. ..|
|00000060| d2 72 6d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.rm.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 27 5e 00 00 |........|....'^..|
|00000080| 0d 53 65 65 64 20 4e 6f | 74 65 0d 0d 43 6f 6c 6f |.Seed No|te..Colo|
|00000090| 72 20 4d 61 6e 61 67 65 | 72 0d 0d 0d 49 53 42 4e |r Manage|r...ISBN|
|000000a0| 20 30 2d 32 30 31 2d 78 | 78 78 78 78 2d 78 0d 31 | 0-201-x|xxxx-x.1|
|000000b0| 20 32 20 33 20 34 20 35 | 20 36 20 37 20 38 20 39 | 2 3 4 5| 6 7 8 9|
|000000c0| 2d 4d 55 2d 39 36 39 35 | 39 34 39 33 39 32 0d 46 |-MU-9695|949392.F|
|000000d0| 69 72 73 74 20 50 72 69 | 6e 74 69 6e 67 2c 20 4a |irst Pri|nting, J|
|000000e0| 75 6e 65 20 31 39 39 33 | 0d 0d 0d 0d 54 68 65 20 |une 1993|....The |
|000000f0| 70 61 70 65 72 20 75 73 | 65 64 20 69 6e 20 74 68 |paper us|ed in th|
|00000100| 69 73 20 62 6f 6f 6b 20 | 6d 65 65 74 73 20 74 68 |is book |meets th|
|00000110| 65 20 45 50 41 20 73 74 | 61 6e 64 61 72 64 73 20 |e EPA st|andards |
|00000120| 66 6f 72 20 72 65 63 79 | 63 6c 65 64 20 66 69 62 |for recy|cled fib|
|00000130| 65 72 2e 0d 0d 0d f0 09 | 41 70 70 6c 65 20 43 6f |er......|Apple Co|
|00000140| 6d 70 75 74 65 72 2c 20 | 49 6e 63 2e 0d a9 20 3c |mputer, |Inc... <|
|00000150| 24 79 65 61 72 3e 2c 20 | 41 70 70 6c 65 20 43 6f |$year>, |Apple Co|
|00000160| 6d 70 75 74 65 72 2c 20 | 49 6e 63 2e 0d 41 6c 6c |mputer, |Inc..All|
|00000170| 20 72 69 67 68 74 73 20 | 72 65 73 65 72 76 65 64 | rights |reserved|
|00000180| 2e 20 0d 4e 6f 20 70 61 | 72 74 20 6f 66 20 74 68 |. .No pa|rt of th|
|00000190| 69 73 20 70 75 62 6c 69 | 63 61 74 69 6f 6e 20 6d |is publi|cation m|
|000001a0| 61 79 20 62 65 20 72 65 | 70 72 6f 64 75 63 65 64 |ay be re|produced|
|000001b0| 2c 20 73 74 6f 72 65 64 | 20 69 6e 20 61 20 72 65 |, stored| in a re|
|000001c0| 74 72 69 65 76 61 6c 20 | 73 79 73 74 65 6d 2c 20 |trieval |system, |
|000001d0| 6f 72 20 74 72 61 6e 73 | 6d 69 74 74 65 64 2c 20 |or trans|mitted, |
|000001e0| 69 6e 20 61 6e 79 20 66 | 6f 72 6d 20 6f 72 20 62 |in any f|orm or b|
|000001f0| 79 20 61 6e 79 20 6d 65 | 61 6e 73 2c 20 6d 65 63 |y any me|ans, mec|
|00000200| 68 61 6e 69 63 61 6c 2c | 20 65 6c 65 63 74 72 6f |hanical,| electro|
|00000210| 6e 69 63 2c 20 70 68 6f | 74 6f 63 6f 70 79 69 6e |nic, pho|tocopyin|
|00000220| 67 2c 20 72 65 63 6f 72 | 64 69 6e 67 2c 20 6f 72 |g, recor|ding, or|
|00000230| 20 6f 74 68 65 72 77 69 | 73 65 2c 20 77 69 74 68 | otherwi|se, with|
|00000240| 6f 75 74 20 70 72 69 6f | 72 20 77 72 69 74 74 65 |out prio|r writte|
|00000250| 6e 20 70 65 72 6d 69 73 | 73 69 6f 6e 20 6f 66 20 |n permis|sion of |
|00000260| 41 70 70 6c 65 20 43 6f | 6d 70 75 74 65 72 2c 20 |Apple Co|mputer, |
|00000270| 49 6e 63 2e 20 50 72 69 | 6e 74 65 64 20 69 6e 20 |Inc. Pri|nted in |
|00000280| 74 68 65 20 55 6e 69 74 | 65 64 20 53 74 61 74 65 |the Unit|ed State|
|00000290| 73 20 6f 66 20 41 6d 65 | 72 69 63 61 2e 0d 4e 6f |s of Ame|rica..No|
|000002a0| 20 6c 69 63 65 6e 73 65 | 73 2c 20 65 78 70 72 65 | license|s, expre|
|000002b0| 73 73 20 6f 72 20 69 6d | 70 6c 69 65 64 2c 20 61 |ss or im|plied, a|
|000002c0| 72 65 20 67 72 61 6e 74 | 65 64 20 77 69 74 68 20 |re grant|ed with |
|000002d0| 72 65 73 70 65 63 74 20 | 74 6f 20 61 6e 79 20 6f |respect |to any o|
|000002e0| 66 20 74 68 65 20 74 65 | 63 68 6e 6f 6c 6f 67 79 |f the te|chnology|
|000002f0| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00000300| 69 73 20 62 6f 6f 6b 2e | 20 41 70 70 6c 65 20 72 |is book.| Apple r|
|00000310| 65 74 61 69 6e 73 20 61 | 6c 6c 20 69 6e 74 65 6c |etains a|ll intel|
|00000320| 6c 65 63 74 75 61 6c 20 | 70 72 6f 70 65 72 74 79 |lectual |property|
|00000330| 20 72 69 67 68 74 73 20 | 61 73 73 6f 63 69 61 74 | rights |associat|
|00000340| 65 64 20 77 69 74 68 20 | 74 68 65 20 74 65 63 68 |ed with |the tech|
|00000350| 6e 6f 6c 6f 67 79 20 64 | 65 73 63 72 69 62 65 64 |nology d|escribed|
|00000360| 20 69 6e 20 74 68 69 73 | 20 62 6f 6f 6b 2e 20 54 | in this| book. T|
|00000370| 68 69 73 20 62 6f 6f 6b | 20 69 73 20 69 6e 74 65 |his book| is inte|
|00000380| 6e 64 65 64 20 74 6f 20 | 61 73 73 69 73 74 20 61 |nded to |assist a|
|00000390| 70 70 6c 69 63 61 74 69 | 6f 6e 20 64 65 76 65 6c |pplicati|on devel|
|000003a0| 6f 70 65 72 73 20 74 6f | 20 64 65 76 65 6c 6f 70 |opers to| develop|
|000003b0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 6f 6e | applica|tions on|
|000003c0| 6c 79 20 66 6f 72 20 41 | 70 70 6c 65 20 4d 61 63 |ly for A|pple Mac|
|000003d0| 69 6e 74 6f 73 68 20 63 | 6f 6d 70 75 74 65 72 73 |intosh c|omputers|
|000003e0| 2e 0d 41 70 70 6c 65 20 | 43 6f 6d 70 75 74 65 72 |..Apple |Computer|
|000003f0| 2c 20 49 6e 63 2e 0d 32 | 30 35 32 35 20 4d 61 72 |, Inc..2|0525 Mar|
|00000400| 69 61 6e 69 20 41 76 65 | 6e 75 65 0d 43 75 70 65 |iani Ave|nue.Cupe|
|00000410| 72 74 69 6e 6f 2c 20 43 | 41 20 39 35 30 31 34 0d |rtino, C|A 95014.|
|00000420| 34 30 38 2d 39 39 36 2d | 31 30 31 30 0d 41 70 70 |408-996-|1010.App|
|00000430| 6c 65 2c 20 74 68 65 20 | 41 70 70 6c 65 20 6c 6f |le, the |Apple lo|
|00000440| 67 6f 2c 20 41 50 44 41 | 2c 20 41 70 70 6c 65 4c |go, APDA|, AppleL|
|00000450| 69 6e 6b 2c 20 41 70 70 | 6c 65 54 61 6c 6b 2c 20 |ink, App|leTalk, |
|00000460| 49 6d 61 67 65 57 72 69 | 74 65 72 2c 20 4c 61 73 |ImageWri|ter, Las|
|00000470| 65 72 57 72 69 74 65 72 | 2c 20 4d 61 63 69 6e 74 |erWriter|, Macint|
|00000480| 6f 73 68 2c 20 61 6e 64 | 20 53 74 79 6c 65 57 72 |osh, and| StyleWr|
|00000490| 69 74 65 72 20 61 72 65 | 20 74 72 61 64 65 6d 61 |iter are| tradema|
|000004a0| 72 6b 73 20 6f 66 20 41 | 70 70 6c 65 20 43 6f 6d |rks of A|pple Com|
|000004b0| 70 75 74 65 72 2c 20 49 | 6e 63 2e 2c 20 72 65 67 |puter, I|nc., reg|
|000004c0| 69 73 74 65 72 65 64 20 | 69 6e 20 74 68 65 20 55 |istered |in the U|
|000004d0| 6e 69 74 65 64 20 53 74 | 61 74 65 73 20 61 6e 64 |nited St|ates and|
|000004e0| 20 6f 74 68 65 72 20 63 | 6f 75 6e 74 72 69 65 73 | other c|ountries|
|000004f0| 2e 0d 43 6f 6c 6f 72 53 | 79 6e 63 2c 20 46 69 6e |..ColorS|ync, Fin|
|00000500| 64 65 72 2c 20 50 6f 77 | 65 72 42 6f 6f 6b 2c 20 |der, Pow|erBook, |
|00000510| 51 75 69 63 6b 44 72 61 | 77 2c 20 51 75 69 63 6b |QuickDra|w, Quick|
|00000520| 54 69 6d 65 2c 20 52 65 | 73 45 64 69 74 2c 20 61 |Time, Re|sEdit, a|
|00000530| 6e 64 20 53 79 73 74 65 | 6d 20 37 20 61 72 65 20 |nd Syste|m 7 are |
|00000540| 74 72 61 64 65 6d 61 72 | 6b 73 20 6f 66 20 41 70 |trademar|ks of Ap|
|00000550| 70 6c 65 20 43 6f 6d 70 | 75 74 65 72 2c 20 49 6e |ple Comp|uter, In|
|00000560| 63 2e 0d 41 64 6f 62 65 | 20 49 6c 6c 75 73 74 72 |c..Adobe| Illustr|
|00000570| 61 74 6f 72 20 61 6e 64 | 20 50 6f 73 74 53 63 72 |ator and| PostScr|
|00000580| 69 70 74 20 61 72 65 20 | 74 72 61 64 65 6d 61 72 |ipt are |trademar|
|00000590| 6b 73 20 6f 66 20 41 64 | 6f 62 65 20 53 79 73 74 |ks of Ad|obe Syst|
|000005a0| 65 6d 73 20 49 6e 63 6f | 72 70 6f 72 61 74 65 64 |ems Inco|rporated|
|000005b0| 2c 20 77 68 69 63 68 20 | 6d 61 79 20 62 65 20 72 |, which |may be r|
|000005c0| 65 67 69 73 74 65 72 65 | 64 20 69 6e 20 63 65 72 |egistere|d in cer|
|000005d0| 74 61 69 6e 20 6a 75 72 | 69 73 64 69 63 74 69 6f |tain jur|isdictio|
|000005e0| 6e 73 2e 0d 41 47 46 41 | 20 69 73 20 61 20 74 72 |ns..AGFA| is a tr|
|000005f0| 61 64 65 6d 61 72 6b 20 | 6f 66 20 41 67 66 61 2d |ademark |of Agfa-|
|00000600| 47 65 76 61 65 72 74 2e | 0d 41 6d 65 72 69 63 61 |Gevaert.|.America|
|00000610| 20 4f 6e 6c 69 6e 65 20 | 69 73 20 61 20 73 65 72 | Online |is a ser|
|00000620| 76 69 63 65 20 6d 61 72 | 6b 20 6f 66 20 51 75 61 |vice mar|k of Qua|
|00000630| 6e 74 75 6d 20 43 6f 6d | 70 75 74 65 72 20 53 65 |ntum Com|puter Se|
|00000640| 72 76 69 63 65 73 2c 20 | 49 6e 63 2e 0d 43 6c 61 |rvices, |Inc..Cla|
|00000650| 73 73 69 63 20 69 73 20 | 61 20 72 65 67 69 73 74 |ssic is |a regist|
|00000660| 65 72 65 64 20 74 72 61 | 64 65 6d 61 72 6b 20 6c |ered tra|demark l|
|00000670| 69 63 65 6e 73 65 64 20 | 74 6f 20 41 70 70 6c 65 |icensed |to Apple|
|00000680| 20 43 6f 6d 70 75 74 65 | 72 2c 20 49 6e 63 2e 0d | Compute|r, Inc..|
|00000690| 43 6f 6d 70 75 53 65 72 | 76 65 20 69 73 20 61 20 |CompuSer|ve is a |
|000006a0| 72 65 67 69 73 74 65 72 | 65 64 20 73 65 72 76 69 |register|ed servi|
|000006b0| 63 65 20 6d 61 72 6b 20 | 6f 66 20 43 6f 6d 70 75 |ce mark |of Compu|
|000006c0| 53 65 72 76 65 2c 20 49 | 6e 63 2e 0d 46 72 61 6d |Serve, I|nc..Fram|
|000006d0| 65 4d 61 6b 65 72 20 69 | 73 20 61 20 72 65 67 69 |eMaker i|s a regi|
|000006e0| 73 74 65 72 65 64 20 74 | 72 61 64 65 6d 61 72 6b |stered t|rademark|
|000006f0| 20 6f 66 20 46 72 61 6d | 65 20 54 65 63 68 6e 6f | of Fram|e Techno|
|00000700| 6c 6f 67 79 20 43 6f 72 | 70 6f 72 61 74 69 6f 6e |logy Cor|poration|
|00000710| 2e 0d 48 65 6c 76 65 74 | 69 63 61 20 61 6e 64 20 |..Helvet|ica and |
|00000720| 50 61 6c 61 74 69 6e 6f | 20 61 72 65 20 72 65 67 |Palatino| are reg|
|00000730| 69 73 74 65 72 65 64 20 | 74 72 61 64 65 6d 61 72 |istered |trademar|
|00000740| 6b 73 20 6f 66 20 4c 69 | 6e 6f 74 79 70 65 20 43 |ks of Li|notype C|
|00000750| 6f 6d 70 61 6e 79 2e 0d | 49 6e 74 65 72 6e 65 74 |ompany..|Internet|
|00000760| 20 69 73 20 61 20 74 72 | 61 64 65 6d 61 72 6b 20 | is a tr|ademark |
|00000770| 6f 66 20 44 69 67 69 74 | 61 6c 20 45 71 75 69 70 |of Digit|al Equip|
|00000780| 6d 65 6e 74 20 43 6f 72 | 70 6f 72 61 74 69 6f 6e |ment Cor|poration|
|00000790| 2e 0d 49 54 43 20 5a 61 | 70 66 20 44 69 6e 67 62 |..ITC Za|pf Dingb|
|000007a0| 61 74 73 20 69 73 20 61 | 20 72 65 67 69 73 74 65 |ats is a| registe|
|000007b0| 72 65 64 20 74 72 61 64 | 65 6d 61 72 6b 20 6f 66 |red trad|emark of|
|000007c0| 20 49 6e 74 65 72 6e 61 | 74 69 6f 6e 61 6c 20 54 | Interna|tional T|
|000007d0| 79 70 65 66 61 63 65 20 | 43 6f 72 70 6f 72 61 74 |ypeface |Corporat|
|000007e0| 69 6f 6e 2e 0d 4d 61 63 | 50 61 69 6e 74 20 69 73 |ion..Mac|Paint is|
|000007f0| 20 61 20 72 65 67 69 73 | 74 65 72 65 64 20 74 72 | a regis|tered tr|
|00000800| 61 64 65 6d 61 72 6b 20 | 6f 66 20 43 6c 61 72 69 |ademark |of Clari|
|00000810| 73 20 43 6f 72 70 6f 72 | 61 74 69 6f 6e 2e 0d 4e |s Corpor|ation..N|
|00000820| 75 42 75 73 20 69 73 20 | 61 20 74 72 61 64 65 6d |uBus is |a tradem|
|00000830| 61 72 6b 20 6f 66 20 54 | 65 78 61 73 20 49 6e 73 |ark of T|exas Ins|
|00000840| 74 72 75 6d 65 6e 74 73 | 2e 0d 4d 6f 74 6f 72 6f |truments|..Motoro|
|00000850| 6c 61 20 69 73 20 61 20 | 72 65 67 69 73 74 65 72 |la is a |register|
|00000860| 65 64 20 74 72 61 64 65 | 6d 61 72 6b 20 6f 66 20 |ed trade|mark of |
|00000870| 4d 6f 74 6f 72 6f 6c 61 | 20 43 6f 72 70 6f 72 61 |Motorola| Corpora|
|00000880| 74 69 6f 6e 2e 0d 53 69 | 6d 75 6c 74 61 6e 65 6f |tion..Si|multaneo|
|00000890| 75 73 6c 79 20 70 75 62 | 6c 69 73 68 65 64 20 69 |usly pub|lished i|
|000008a0| 6e 20 74 68 65 20 55 6e | 69 74 65 64 20 53 74 61 |n the Un|ited Sta|
|000008b0| 74 65 73 20 61 6e 64 20 | 43 61 6e 61 64 61 2e 0d |tes and |Canada..|
|000008c0| 4c 49 4d 49 54 45 44 20 | 57 41 52 52 41 4e 54 59 |LIMITED |WARRANTY|
|000008d0| 20 4f 4e 20 4d 45 44 49 | 41 20 41 4e 44 20 52 45 | ON MEDI|A AND RE|
|000008e0| 50 4c 41 43 45 4d 45 4e | 54 0d 41 4c 4c 20 49 4d |PLACEMEN|T.ALL IM|
|000008f0| 50 4c 49 45 44 20 57 41 | 52 52 41 4e 54 49 45 53 |PLIED WA|RRANTIES|
|00000900| 20 4f 4e 20 54 48 49 53 | 20 4d 41 4e 55 41 4c 2c | ON THIS| MANUAL,|
|00000910| 20 49 4e 43 4c 55 44 49 | 4e 47 20 49 4d 50 4c 49 | INCLUDI|NG IMPLI|
|00000920| 45 44 20 57 41 52 52 41 | 4e 54 49 45 53 20 4f 46 |ED WARRA|NTIES OF|
|00000930| 20 4d 45 52 43 48 41 4e | 54 41 42 49 4c 49 54 59 | MERCHAN|TABILITY|
|00000940| 20 41 4e 44 20 46 49 54 | 4e 45 53 53 20 46 4f 52 | AND FIT|NESS FOR|
|00000950| 20 41 20 50 41 52 54 49 | 43 55 4c 41 52 20 50 55 | A PARTI|CULAR PU|
|00000960| 52 50 4f 53 45 2c 20 41 | 52 45 20 4c 49 4d 49 54 |RPOSE, A|RE LIMIT|
|00000970| 45 44 20 49 4e 20 44 55 | 52 41 54 49 4f 4e 20 54 |ED IN DU|RATION T|
|00000980| 4f 20 4e 49 4e 45 54 59 | 20 28 39 30 29 20 44 41 |O NINETY| (90) DA|
|00000990| 59 53 20 46 52 4f 4d 20 | 54 48 45 20 44 41 54 45 |YS FROM |THE DATE|
|000009a0| 20 4f 46 20 54 48 45 20 | 4f 52 49 47 49 4e 41 4c | OF THE |ORIGINAL|
|000009b0| 20 52 45 54 41 49 4c 20 | 50 55 52 43 48 41 53 45 | RETAIL |PURCHASE|
|000009c0| 20 4f 46 20 54 48 49 53 | 20 50 52 4f 44 55 43 54 | OF THIS| PRODUCT|
|000009d0| 2e 0d 45 76 65 6e 20 74 | 68 6f 75 67 68 20 41 70 |..Even t|hough Ap|
|000009e0| 70 6c 65 20 68 61 73 20 | 72 65 76 69 65 77 65 64 |ple has |reviewed|
|000009f0| 20 74 68 69 73 20 6d 61 | 6e 75 61 6c 2c 20 41 50 | this ma|nual, AP|
|00000a00| 50 4c 45 20 4d 41 4b 45 | 53 20 4e 4f 20 57 41 52 |PLE MAKE|S NO WAR|
|00000a10| 52 41 4e 54 59 20 4f 52 | 20 52 45 50 52 45 53 45 |RANTY OR| REPRESE|
|00000a20| 4e 54 41 54 49 4f 4e 2c | 20 45 49 54 48 45 52 20 |NTATION,| EITHER |
|00000a30| 45 58 50 52 45 53 53 20 | 4f 52 20 49 4d 50 4c 49 |EXPRESS |OR IMPLI|
|00000a40| 45 44 2c 20 57 49 54 48 | 20 52 45 53 50 45 43 54 |ED, WITH| RESPECT|
|00000a50| 20 54 4f 20 54 48 49 53 | 20 4d 41 4e 55 41 4c 2c | TO THIS| MANUAL,|
|00000a60| 20 49 54 53 20 51 55 41 | 4c 49 54 59 2c 20 41 43 | ITS QUA|LITY, AC|
|00000a70| 43 55 52 41 43 59 2c 20 | 4d 45 52 43 48 41 4e 54 |CURACY, |MERCHANT|
|00000a80| 41 42 49 4c 49 54 59 2c | 20 4f 52 20 46 49 54 4e |ABILITY,| OR FITN|
|00000a90| 45 53 53 20 46 4f 52 20 | 41 20 50 41 52 54 49 43 |ESS FOR |A PARTIC|
|00000aa0| 55 4c 41 52 20 50 55 52 | 50 4f 53 45 2e 20 41 53 |ULAR PUR|POSE. AS|
|00000ab0| 20 41 20 52 45 53 55 4c | 54 2c 20 54 48 49 53 20 | A RESUL|T, THIS |
|00000ac0| 4d 41 4e 55 41 4c 20 49 | 53 20 53 4f 4c 44 20 d2 |MANUAL I|S SOLD .|
|00000ad0| 41 53 20 49 53 2c d3 20 | 41 4e 44 20 59 4f 55 2c |AS IS,. |AND YOU,|
|00000ae0| 20 54 48 45 20 50 55 52 | 43 48 41 53 45 52 2c 20 | THE PUR|CHASER, |
|00000af0| 41 52 45 20 41 53 53 55 | 4d 49 4e 47 20 54 48 45 |ARE ASSU|MING THE|
|00000b00| 20 45 4e 54 49 52 45 20 | 52 49 53 4b 20 41 53 20 | ENTIRE |RISK AS |
|00000b10| 54 4f 20 49 54 53 20 51 | 55 41 4c 49 54 59 20 41 |TO ITS Q|UALITY A|
|00000b20| 4e 44 20 41 43 43 55 52 | 41 43 59 2e 0d 49 4e 20 |ND ACCUR|ACY..IN |
|00000b30| 4e 4f 20 45 56 45 4e 54 | 20 57 49 4c 4c 20 41 50 |NO EVENT| WILL AP|
|00000b40| 50 4c 45 20 42 45 20 4c | 49 41 42 4c 45 20 46 4f |PLE BE L|IABLE FO|
|00000b50| 52 20 44 49 52 45 43 54 | 2c 20 49 4e 44 49 52 45 |R DIRECT|, INDIRE|
|00000b60| 43 54 2c 20 53 50 45 43 | 49 41 4c 2c 20 49 4e 43 |CT, SPEC|IAL, INC|
|00000b70| 49 44 45 4e 54 41 4c 2c | 20 4f 52 20 43 4f 4e 53 |IDENTAL,| OR CONS|
|00000b80| 45 51 55 45 4e 54 49 41 | 4c 20 44 41 4d 41 47 45 |EQUENTIA|L DAMAGE|
|00000b90| 53 20 52 45 53 55 4c 54 | 49 4e 47 20 46 52 4f 4d |S RESULT|ING FROM|
|00000ba0| 20 41 4e 59 20 44 45 46 | 45 43 54 20 4f 52 20 49 | ANY DEF|ECT OR I|
|00000bb0| 4e 41 43 43 55 52 41 43 | 59 20 49 4e 20 54 48 49 |NACCURAC|Y IN THI|
|00000bc0| 53 20 4d 41 4e 55 41 4c | 2c 20 65 76 65 6e 20 69 |S MANUAL|, even i|
|00000bd0| 66 20 61 64 76 69 73 65 | 64 20 6f 66 20 74 68 65 |f advise|d of the|
|00000be0| 20 70 6f 73 73 69 62 69 | 6c 69 74 79 20 6f 66 20 | possibi|lity of |
|00000bf0| 73 75 63 68 20 64 61 6d | 61 67 65 73 2e 0d 54 48 |such dam|ages..TH|
|00000c00| 45 20 57 41 52 52 41 4e | 54 59 20 41 4e 44 20 52 |E WARRAN|TY AND R|
|00000c10| 45 4d 45 44 49 45 53 20 | 53 45 54 20 46 4f 52 54 |EMEDIES |SET FORT|
|00000c20| 48 20 41 42 4f 56 45 20 | 41 52 45 20 45 58 43 4c |H ABOVE |ARE EXCL|
|00000c30| 55 53 49 56 45 20 41 4e | 44 20 49 4e 20 4c 49 45 |USIVE AN|D IN LIE|
|00000c40| 55 20 4f 46 20 41 4c 4c | 20 4f 54 48 45 52 53 2c |U OF ALL| OTHERS,|
|00000c50| 20 4f 52 41 4c 20 4f 52 | 20 57 52 49 54 54 45 4e | ORAL OR| WRITTEN|
|00000c60| 2c 20 45 58 50 52 45 53 | 53 20 4f 52 20 49 4d 50 |, EXPRES|S OR IMP|
|00000c70| 4c 49 45 44 2e 20 4e 6f | 20 41 70 70 6c 65 20 64 |LIED. No| Apple d|
|00000c80| 65 61 6c 65 72 2c 20 61 | 67 65 6e 74 2c 20 6f 72 |ealer, a|gent, or|
|00000c90| 20 65 6d 70 6c 6f 79 65 | 65 20 69 73 20 61 75 74 | employe|e is aut|
|00000ca0| 68 6f 72 69 7a 65 64 20 | 74 6f 20 6d 61 6b 65 20 |horized |to make |
|00000cb0| 61 6e 79 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |any modi|fication|
|00000cc0| 2c 20 65 78 74 65 6e 73 | 69 6f 6e 2c 20 6f 72 20 |, extens|ion, or |
|00000cd0| 61 64 64 69 74 69 6f 6e | 20 74 6f 20 74 68 69 73 |addition| to this|
|00000ce0| 20 77 61 72 72 61 6e 74 | 79 2e 0d 53 6f 6d 65 20 | warrant|y..Some |
|00000cf0| 73 74 61 74 65 73 20 64 | 6f 20 6e 6f 74 20 61 6c |states d|o not al|
|00000d00| 6c 6f 77 20 74 68 65 20 | 65 78 63 6c 75 73 69 6f |low the |exclusio|
|00000d10| 6e 20 6f 72 20 6c 69 6d | 69 74 61 74 69 6f 6e 20 |n or lim|itation |
|00000d20| 6f 66 20 69 6d 70 6c 69 | 65 64 20 77 61 72 72 61 |of impli|ed warra|
|00000d30| 6e 74 69 65 73 20 6f 72 | 20 6c 69 61 62 69 6c 69 |nties or| liabili|
|00000d40| 74 79 20 66 6f 72 20 69 | 6e 63 69 64 65 6e 74 61 |ty for i|ncidenta|
|00000d50| 6c 20 6f 72 20 63 6f 6e | 73 65 71 75 65 6e 74 69 |l or con|sequenti|
|00000d60| 61 6c 20 64 61 6d 61 67 | 65 73 2c 20 73 6f 20 74 |al damag|es, so t|
|00000d70| 68 65 20 61 62 6f 76 65 | 20 6c 69 6d 69 74 61 74 |he above| limitat|
|00000d80| 69 6f 6e 20 6f 72 20 65 | 78 63 6c 75 73 69 6f 6e |ion or e|xclusion|
|00000d90| 20 6d 61 79 20 6e 6f 74 | 20 61 70 70 6c 79 20 74 | may not| apply t|
|00000da0| 6f 20 79 6f 75 2e 20 54 | 68 69 73 20 77 61 72 72 |o you. T|his warr|
|00000db0| 61 6e 74 79 20 67 69 76 | 65 73 20 79 6f 75 20 73 |anty giv|es you s|
|00000dc0| 70 65 63 69 66 69 63 20 | 6c 65 67 61 6c 20 72 69 |pecific |legal ri|
|00000dd0| 67 68 74 73 2c 20 61 6e | 64 20 79 6f 75 20 6d 61 |ghts, an|d you ma|
|00000de0| 79 20 61 6c 73 6f 20 68 | 61 76 65 20 6f 74 68 65 |y also h|ave othe|
|00000df0| 72 20 72 69 67 68 74 73 | 20 77 68 69 63 68 20 76 |r rights| which v|
|00000e00| 61 72 79 20 66 72 6f 6d | 20 73 74 61 74 65 20 74 |ary from| state t|
|00000e10| 6f 20 73 74 61 74 65 2e | 0d 4c 69 73 74 69 6e 67 |o state.|.Listing|
|00000e20| 20 31 2d 30 0d 54 61 62 | 6c 65 20 31 2d 30 0d 43 | 1-0.Tab|le 1-0.C|
|00000e30| 6f 6e 74 65 6e 74 73 0d | 43 6f 6c 6f 72 20 4d 61 |ontents.|Color Ma|
|00000e40| 6e 61 67 65 72 0d 43 6f | 6e 74 65 6e 74 73 0d 41 |nager.Co|ntents.A|
|00000e50| 62 6f 75 74 20 74 68 65 | 20 43 6f 6c 6f 72 20 4d |bout the| Color M|
|00000e60| 61 6e 61 67 65 72 14 14 | 31 2d 35 0d 47 72 61 70 |anager..|1-5.Grap|
|00000e70| 68 69 63 73 20 44 65 76 | 69 63 65 73 14 14 31 2d |hics Dev|ices..1-|
|00000e80| 36 0d 43 6f 6c 6f 72 20 | 54 61 62 6c 65 73 14 14 |6.Color |Tables..|
|00000e90| 31 2d 36 0d 49 6e 76 65 | 72 73 65 20 54 61 62 6c |1-6.Inve|rse Tabl|
|00000ea0| 65 73 14 14 31 2d 37 0d | 49 6e 76 65 72 73 65 20 |es..1-7.|Inverse |
|00000eb0| 54 61 62 6c 65 73 20 69 | 6e 20 41 63 74 69 6f 6e |Tables i|n Action|
|00000ec0| 14 14 31 2d 31 30 0d 48 | 69 64 64 65 6e 20 43 6f |..1-10.H|idden Co|
|00000ed0| 6c 6f 72 73 14 14 31 2d | 31 32 0d 42 75 69 6c 64 |lors..1-|12.Build|
|00000ee0| 69 6e 67 20 49 6e 76 65 | 72 73 65 20 54 61 62 6c |ing Inve|rse Tabl|
|00000ef0| 65 73 14 14 31 2d 31 32 | 0d 55 73 69 6e 67 20 74 |es..1-12|.Using t|
|00000f00| 68 65 20 43 6f 6c 6f 72 | 20 4d 61 6e 61 67 65 72 |he Color| Manager|
|00000f10| 14 14 31 2d 31 33 0d 43 | 75 73 74 6f 6d 69 7a 69 |..1-13.C|ustomizi|
|00000f20| 6e 67 20 53 65 61 72 63 | 68 20 50 72 6f 63 65 64 |ng Searc|h Proced|
|00000f30| 75 72 65 73 14 14 31 2d | 31 33 0d 43 75 73 74 6f |ures..1-|13.Custo|
|00000f40| 6d 69 7a 69 6e 67 20 43 | 6f 6d 70 6c 65 6d 65 6e |mizing C|omplemen|
|00000f50| 74 20 50 72 6f 63 65 64 | 75 72 65 73 14 14 31 2d |t Proced|ures..1-|
|00000f60| 31 35 0d 4d 61 6e 61 67 | 69 6e 67 20 74 68 65 20 |15.Manag|ing the |
|00000f70| 44 65 76 69 63 65 20 43 | 4c 55 54 14 14 31 2d 31 |Device C|LUT..1-1|
|00000f80| 35 0d 43 6f 6c 6f 72 20 | 4d 61 6e 61 67 65 72 20 |5.Color |Manager |
|00000f90| 52 65 66 65 72 65 6e 63 | 65 14 14 31 2d 31 37 0d |Referenc|e..1-17.|
|00000fa0| 44 61 74 61 20 53 74 72 | 75 63 74 75 72 65 73 14 |Data Str|uctures.|
|00000fb0| 14 31 2d 31 37 0d 52 6f | 75 74 69 6e 65 73 14 14 |.1-17.Ro|utines..|
|00000fc0| 31 2d 31 39 0d 4d 61 6e | 61 67 69 6e 67 20 43 6f |1-19.Man|aging Co|
|00000fd0| 6c 6f 72 73 14 14 31 2d | 31 39 0d 4d 61 6e 61 67 |lors..1-|19.Manag|
|00000fe0| 69 6e 67 20 43 6f 6c 6f | 72 20 54 61 62 6c 65 73 |ing Colo|r Tables|
|00000ff0| 14 14 31 2d 32 32 0d 4f | 70 65 72 61 74 69 6f 6e |..1-22.O|peration|
|00001000| 73 20 6f 6e 20 53 65 61 | 72 63 68 20 61 6e 64 20 |s on Sea|rch and |
|00001010| 43 6f 6d 70 6c 65 6d 65 | 6e 74 20 50 72 6f 63 65 |Compleme|nt Proce|
|00001020| 64 75 72 65 73 14 14 31 | 2d 32 37 0d 41 70 70 6c |dures..1|-27.Appl|
|00001030| 69 63 61 74 69 6f 6e 2d | 44 65 66 69 6e 65 64 20 |ication-|Defined |
|00001040| 52 6f 75 74 69 6e 65 73 | 14 14 31 2d 32 38 0d 53 |Routines|..1-28.S|
|00001050| 75 6d 6d 61 72 79 20 6f | 66 20 74 68 65 20 43 6f |ummary o|f the Co|
|00001060| 6c 6f 72 20 4d 61 6e 61 | 67 65 72 14 14 31 2d 33 |lor Mana|ger..1-3|
|00001070| 30 0d 50 61 73 63 61 6c | 20 53 75 6d 6d 61 72 79 |0.Pascal| Summary|
|00001080| 14 14 31 2d 33 30 0d 43 | 6f 6e 73 74 61 6e 74 73 |..1-30.C|onstants|
|00001090| 14 14 31 2d 33 30 0d 44 | 61 74 61 20 54 79 70 65 |..1-30.D|ata Type|
|000010a0| 73 14 14 31 2d 33 30 0d | 52 6f 75 74 69 6e 65 73 |s..1-30.|Routines|
|000010b0| 14 14 31 2d 33 31 0d 43 | 20 53 75 6d 6d 61 72 79 |..1-31.C| Summary|
|000010c0| 14 14 31 2d 33 32 0d 43 | 6f 6e 73 74 61 6e 74 73 |..1-32.C|onstants|
|000010d0| 14 14 31 2d 33 32 0d 44 | 61 74 61 20 54 79 70 65 |..1-32.D|ata Type|
|000010e0| 73 14 14 31 2d 33 32 0d | 46 75 6e 63 74 69 6f 6e |s..1-32.|Function|
|000010f0| 73 14 14 31 2d 33 33 0d | 41 73 73 65 6d 62 6c 79 |s..1-33.|Assembly|
|00001100| 20 4c 61 6e 67 75 61 67 | 65 20 53 75 6d 6d 61 72 | Languag|e Summar|
|00001110| 79 14 14 31 2d 33 34 0d | 44 61 74 61 20 53 74 72 |y..1-34.|Data Str|
|00001120| 75 63 74 75 72 65 73 14 | 14 31 2d 33 34 0d 0d 43 |uctures.|.1-34..C|
|00001130| 6f 6c 6f 72 20 4d 61 6e | 61 67 65 72 0d 0d 54 68 |olor Man|ager..Th|
|00001140| 65 20 43 6f 6c 6f 72 20 | 4d 61 6e 61 67 65 72 20 |e Color |Manager |
|00001150| 73 75 70 70 6c 69 65 73 | 20 63 6f 6c 6f 72 2d 73 |supplies| color-s|
|00001160| 65 6c 65 63 74 69 6f 6e | 20 73 75 70 70 6f 72 74 |election| support|
|00001170| 20 66 6f 72 20 43 6f 6c | 6f 72 20 51 75 69 63 6b | for Col|or Quick|
|00001180| 44 72 61 77 2e 20 54 68 | 65 20 73 6f 66 74 77 61 |Draw. Th|e softwa|
|00001190| 72 65 20 64 65 73 63 72 | 69 62 65 64 20 69 6e 20 |re descr|ibed in |
|000011a0| 74 68 69 73 20 63 68 61 | 70 74 65 72 20 61 6c 6c |this cha|pter all|
|000011b0| 6f 77 73 20 73 70 65 63 | 69 61 6c 69 7a 65 64 20 |ows spec|ialized |
|000011c0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 74 6f 20 |applicat|ions to |
|000011d0| 66 69 6e 65 2d 74 75 6e | 65 20 74 68 65 20 63 6f |fine-tun|e the co|
|000011e0| 6c 6f 72 2d 6d 61 70 70 | 69 6e 67 20 61 6c 67 6f |lor-mapp|ing algo|
|000011f0| 72 69 74 68 6d 73 3b 20 | 69 74 20 61 6c 73 6f 20 |rithms; |it also |
|00001200| 70 72 6f 76 69 64 65 73 | 20 43 6f 6c 6f 72 20 51 |provides| Color Q|
|00001210| 75 69 63 6b 44 72 61 77 | 20 77 69 74 68 20 6f 74 |uickDraw| with ot|
|00001220| 68 65 72 20 75 74 69 6c | 69 74 79 20 66 75 6e 63 |her util|ity func|
|00001230| 74 69 6f 6e 73 20 74 68 | 61 74 20 61 72 65 20 72 |tions th|at are r|
|00001240| 61 72 65 6c 79 20 75 73 | 65 64 20 62 79 20 61 70 |arely us|ed by ap|
|00001250| 70 6c 69 63 61 74 69 6f | 6e 73 2e 20 59 6f 75 20 |plicatio|ns. You |
|00001260| 6e 65 65 64 20 74 6f 20 | 72 65 61 64 20 74 68 69 |need to |read thi|
|00001270| 73 20 63 68 61 70 74 65 | 72 20 69 66 20 79 6f 75 |s chapte|r if you|
|00001280| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 72 65 |r applic|ation re|
|00001290| 71 75 69 72 65 73 20 61 | 20 63 6f 6c 6f 72 2d 6d |quires a| color-m|
|000012a0| 61 70 70 69 6e 67 20 6d | 65 74 68 6f 64 20 6f 74 |apping m|ethod ot|
|000012b0| 68 65 72 20 74 68 61 6e | 20 74 68 65 20 6f 6e 65 |her than| the one|
|000012c0| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 43 6f 6c | used by| the Col|
|000012d0| 6f 72 20 4d 61 6e 61 67 | 65 72 2e 0d 59 6f 75 20 |or Manag|er..You |
|000012e0| 6e 65 65 64 20 74 6f 20 | 75 6e 64 65 72 73 74 61 |need to |understa|
|000012f0| 6e 64 20 43 6f 6c 6f 72 | 20 51 75 69 63 6b 44 72 |nd Color| QuickDr|
|00001300| 61 77 20 63 6f 6e 63 65 | 70 74 73 2c 20 74 65 72 |aw conce|pts, ter|
|00001310| 6d 69 6e 6f 6c 6f 67 79 | 2c 20 61 6e 64 20 64 61 |minology|, and da|
|00001320| 74 61 20 73 74 72 75 63 | 74 75 72 65 73 20 77 68 |ta struc|tures wh|
|00001330| 65 6e 20 75 73 69 6e 67 | 20 74 68 65 20 6d 61 74 |en using| the mat|
|00001340| 65 72 69 61 6c 20 69 6e | 20 74 68 69 73 20 63 68 |erial in| this ch|
|00001350| 61 70 74 65 72 2e 20 59 | 6f 75 20 73 68 6f 75 6c |apter. Y|ou shoul|
|00001360| 64 20 62 65 20 66 61 6d | 69 6c 69 61 72 20 77 69 |d be fam|iliar wi|
|00001370| 74 68 20 52 47 42 20 63 | 6f 6c 6f 72 73 2c 20 63 |th RGB c|olors, c|
|00001380| 6f 6c 6f 72 20 74 61 62 | 6c 65 73 2c 20 61 6e 64 |olor tab|les, and|
|00001390| 20 70 69 78 65 6c 20 6d | 61 70 73 20 61 73 20 64 | pixel m|aps as d|
|000013a0| 65 73 63 72 69 62 65 64 | 20 69 6e 20 74 68 65 20 |escribed| in the |
|000013b0| 63 68 61 70 74 65 72 73 | 2c 20 d2 49 6e 74 72 6f |chapters|, .Intro|
|000013c0| 64 75 63 74 69 6f 6e 20 | 74 6f 20 4d 61 63 69 6e |duction |to Macin|
|000013d0| 74 6f 73 68 20 49 6d 61 | 67 69 6e 67 d3 20 61 6e |tosh Ima|ging. an|
|000013e0| 64 20 d2 43 6f 6c 6f 72 | 20 51 75 69 63 6b 44 72 |d .Color| QuickDr|
|000013f0| 61 77 d3 20 69 6e 20 74 | 68 69 73 20 62 6f 6f 6b |aw. in t|his book|
|00001400| 2e 20 59 6f 75 20 61 6c | 73 6f 20 6e 65 65 64 20 |. You al|so need |
|00001410| 74 6f 20 75 6e 64 65 72 | 73 74 61 6e 64 20 67 72 |to under|stand gr|
|00001420| 61 70 68 69 63 73 20 64 | 65 76 69 63 65 73 2c 20 |aphics d|evices, |
|00001430| 61 73 20 65 78 70 6c 61 | 69 6e 65 64 20 69 6e 20 |as expla|ined in |
|00001440| 74 68 65 20 63 68 61 70 | 74 65 72 20 d2 47 72 61 |the chap|ter .Gra|
|00001450| 70 68 69 63 73 20 57 6f | 72 6c 64 73 d3 20 69 6e |phics Wo|rlds. in|
|00001460| 20 74 68 69 73 20 62 6f | 6f 6b 2e 0d 43 6f 6c 6f | this bo|ok..Colo|
|00001470| 72 20 4d 61 6e 61 67 65 | 72 20 72 6f 75 74 69 6e |r Manage|r routin|
|00001480| 65 73 20 61 72 65 20 74 | 68 65 20 69 6e 74 65 72 |es are t|he inter|
|00001490| 6d 65 64 69 61 72 79 20 | 62 65 74 77 65 65 6e 20 |mediary |between |
|000014a0| 73 75 63 68 20 68 69 67 | 68 2d 6c 65 76 65 6c 20 |such hig|h-level |
|000014b0| 73 6f 66 74 77 61 72 65 | 20 61 73 20 43 6f 6c 6f |software| as Colo|
|000014c0| 72 20 51 75 69 63 6b 44 | 72 61 77 2c 20 74 68 65 |r QuickD|raw, the|
|000014d0| 20 50 61 6c 65 74 74 65 | 20 4d 61 6e 61 67 65 72 | Palette| Manager|
|000014e0| 2c 20 61 6e 64 20 74 68 | 65 20 43 6f 6c 6f 72 20 |, and th|e Color |
|000014f0| 50 69 63 6b 65 72 2c 20 | 61 6e 64 20 74 68 65 20 |Picker, |and the |
|00001500| 6c 6f 77 65 72 2d 6c 65 | 76 65 6c 20 6f 66 20 76 |lower-le|vel of v|
|00001510| 69 64 65 6f 20 63 61 72 | 64 73 20 61 6e 64 20 73 |ideo car|ds and s|
|00001520| 63 72 65 65 6e 73 2e 20 | 54 68 65 20 76 61 73 74 |creens. |The vast|
|00001530| 20 6d 61 6a 6f 72 69 74 | 79 20 6f 66 20 61 70 70 | majorit|y of app|
|00001540| 6c 69 63 61 74 69 6f 6e | 73 20 6e 65 76 65 72 20 |lication|s never |
|00001550| 6e 65 65 64 20 74 6f 20 | 75 73 65 20 43 6f 6c 6f |need to |use Colo|
|00001560| 72 20 4d 61 6e 61 67 65 | 72 20 72 6f 75 74 69 6e |r Manage|r routin|
|00001570| 65 73 20 64 69 72 65 63 | 74 6c 79 2e 0d 0d 41 62 |es direc|tly...Ab|
|00001580| 6f 75 74 20 74 68 65 20 | 43 6f 6c 6f 72 20 4d 61 |out the |Color Ma|
|00001590| 6e 61 67 65 72 0d 0d 54 | 68 65 20 43 6f 6c 6f 72 |nager..T|he Color|
|000015a0| 20 4d 61 6e 61 67 65 72 | 20 69 73 20 6f 70 74 69 | Manager| is opti|
|000015b0| 6d 69 7a 65 64 20 74 6f | 20 77 6f 72 6b 20 77 69 |mized to| work wi|
|000015c0| 74 68 20 67 72 61 70 68 | 69 63 73 20 68 61 72 64 |th graph|ics hard|
|000015d0| 77 61 72 65 20 74 68 61 | 74 20 63 6f 6e 74 61 69 |ware tha|t contai|
|000015e0| 6e 73 20 61 20 63 6f 6c | 6f 72 20 6c 6f 6f 6b 75 |ns a col|or looku|
|000015f0| 70 20 74 61 62 6c 65 20 | 28 43 4c 55 54 29 2c 20 |p table |(CLUT), |
|00001600| 61 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |a data s|tructure|
|00001610| 20 74 68 61 74 20 6d 61 | 70 73 20 74 68 65 20 69 | that ma|ps the i|
|00001620| 6e 64 65 78 20 76 61 6c | 75 65 73 20 69 6e 74 6f |ndex val|ues into|
|00001630| 20 61 63 74 75 61 6c 20 | 52 47 42 20 63 6f 6c 6f | actual |RGB colo|
|00001640| 72 73 2e 20 41 73 20 72 | 65 63 6f 75 6e 74 65 64 |rs. As r|ecounted|
|00001650| 20 69 6e 20 74 68 65 20 | 63 68 61 70 74 65 72 20 | in the |chapter |
|00001660| d2 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 20 74 6f |.Introdu|ction to|
|00001670| 20 4d 61 63 69 6e 74 6f | 73 68 20 49 6d 61 67 69 | Macinto|sh Imagi|
|00001680| 6e 67 2c d3 20 43 6f 6c | 6f 72 20 51 75 69 63 6b |ng,. Col|or Quick|
|00001690| 44 72 61 77 20 73 75 70 | 70 6f 72 74 73 20 74 77 |Draw sup|ports tw|
|000016a0| 6f 20 6b 69 6e 64 73 20 | 6f 66 20 64 65 76 69 63 |o kinds |of devic|
|000016b0| 65 73 3a 0d 6e 09 49 6e | 64 65 78 65 64 20 64 65 |es:.n.In|dexed de|
|000016c0| 76 69 63 65 73 20 63 6f | 6e 74 61 69 6e 20 68 61 |vices co|ntain ha|
|000016d0| 72 64 77 61 72 65 20 74 | 68 61 74 20 63 6f 6e 76 |rdware t|hat conv|
|000016e0| 65 72 74 73 20 61 6e 20 | 69 6e 64 65 78 20 70 69 |erts an |index pi|
|000016f0| 78 65 6c 20 76 61 6c 75 | 65 20 73 74 6f 72 65 64 |xel valu|e stored|
|00001700| 20 69 6e 20 74 68 65 20 | 63 61 72 64 d5 73 20 76 | in the |card.s v|
|00001710| 69 64 65 6f 20 52 41 4d | 20 74 6f 20 73 6f 6d 65 |ideo RAM| to some|
|00001720| 20 61 63 74 75 61 6c 20 | 52 47 42 20 63 6f 6c 6f | actual |RGB colo|
|00001730| 72 2e 20 54 68 65 20 70 | 69 78 65 6c 20 76 61 6c |r. The p|ixel val|
|00001740| 75 65 20 63 61 6e 20 62 | 65 20 61 6e 20 69 6e 64 |ue can b|e an ind|
|00001750| 65 78 20 74 6f 20 61 6e | 79 20 6f 66 20 74 68 65 |ex to an|y of the|
|00001760| 20 63 6f 6c 6f 72 73 20 | 69 6e 20 74 68 65 20 43 | colors |in the C|
|00001770| 4c 55 54 20 66 6f 72 20 | 74 68 65 20 64 65 76 69 |LUT for |the devi|
|00001780| 63 65 2c 20 61 6e 64 20 | 66 6f 72 20 6d 6f 73 74 |ce, and |for most|
|00001790| 20 43 4c 55 54 73 20 74 | 68 65 20 73 65 74 20 6f | CLUTs t|he set o|
|000017a0| 66 20 63 6f 6c 6f 72 73 | 20 63 61 6e 20 62 65 20 |f colors| can be |
|000017b0| 63 68 61 6e 67 65 64 2e | 0d 6e 09 44 69 72 65 63 |changed.|.n.Direc|
|000017c0| 74 20 64 65 76 69 63 65 | 73 20 64 69 73 70 6c 61 |t device|s displa|
|000017d0| 79 20 74 68 65 20 52 47 | 42 20 70 69 78 65 6c 20 |y the RG|B pixel |
|000017e0| 76 61 6c 75 65 20 73 74 | 6f 72 65 64 20 69 6e 20 |value st|ored in |
|000017f0| 74 68 65 20 63 61 72 64 | d5 73 20 76 69 64 65 6f |the card|.s video|
|00001800| 20 52 41 4d 2e 20 55 6e | 6c 69 6b 65 20 69 6e 64 | RAM. Un|like ind|
|00001810| 65 78 65 64 20 64 65 76 | 69 63 65 73 2c 20 76 61 |exed dev|ices, va|
|00001820| 6c 75 65 73 20 70 6c 61 | 63 65 64 20 69 6e 20 74 |lues pla|ced in t|
|00001830| 68 65 20 66 72 61 6d 65 | 20 62 75 66 66 65 72 20 |he frame| buffer |
|00001840| 6f 66 20 64 69 72 65 63 | 74 20 64 65 76 69 63 65 |of direc|t device|
|00001850| 73 20 70 72 6f 64 75 63 | 65 20 74 68 65 20 73 61 |s produc|e the sa|
|00001860| 6d 65 20 63 6f 6c 6f 72 | 20 65 76 65 72 79 20 74 |me color| every t|
|00001870| 69 6d 65 2e 0d 43 6f 6c | 6f 72 20 51 75 69 63 6b |ime..Col|or Quick|
|00001880| 44 72 61 77 20 75 73 65 | 73 20 74 68 65 20 43 6f |Draw use|s the Co|
|00001890| 6c 6f 72 20 4d 61 6e 61 | 67 65 72 20 74 6f 20 64 |lor Mana|ger to d|
|000018a0| 65 74 65 72 6d 69 6e 65 | 20 77 68 69 63 68 20 65 |etermine| which e|
|000018b0| 6e 74 72 79 20 69 6e 20 | 61 20 64 65 76 69 63 65 |ntry in |a device|
|000018c0| d5 73 20 43 4c 55 54 20 | 62 65 73 74 20 6d 61 70 |.s CLUT |best map|
|000018d0| 73 20 74 6f 20 61 6e 20 | 52 47 42 20 63 6f 6c 6f |s to an |RGB colo|
|000018e0| 72 2e 20 57 68 65 6e 20 | 79 6f 75 72 20 61 70 70 |r. When |your app|
|000018f0| 6c 69 63 61 74 69 6f 6e | 20 75 73 65 73 20 74 68 |lication| uses th|
|00001900| 65 20 52 47 42 46 6f 72 | 65 43 6f 6c 6f 72 20 6f |e RGBFor|eColor o|
|00001910| 72 20 52 47 42 42 61 63 | 6b 43 6f 6c 6f 72 20 70 |r RGBBac|kColor p|
|00001920| 72 6f 63 65 64 75 72 65 | 20 74 6f 20 73 65 74 20 |rocedure| to set |
|00001930| 61 6e 20 52 47 42 20 63 | 6f 6c 6f 72 20 61 73 20 |an RGB c|olor as |
|00001940| 74 68 65 20 66 6f 72 65 | 67 72 6f 75 6e 64 20 6f |the fore|ground o|
|00001950| 72 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 63 6f 6c |r backgr|ound col|
|00001960| 6f 72 2c 20 43 6f 6c 6f | 72 20 51 75 69 63 6b 44 |or, Colo|r QuickD|
|00001970| 72 61 77 20 63 61 6c 6c | 73 20 6f 6e 20 74 68 65 |raw call|s on the|
|00001980| 20 43 6f 6c 6f 72 20 4d | 61 6e 61 67 65 72 20 74 | Color M|anager t|
|00001990| 6f 20 66 69 6e 64 20 74 | 68 65 20 63 6f 6c 6f 72 |o find t|he color|
|000019a0| 20 69 6e 20 74 68 65 20 | 43 4c 55 54 20 6f 66 20 | in the |CLUT of |
|000019b0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 67 72 61 70 |the curr|ent grap|
|000019c0| 68 69 63 73 20 64 65 76 | 69 63 65 20 74 68 61 74 |hics dev|ice that|
|000019d0| 20 6d 61 70 73 20 6d 6f | 73 74 20 63 6c 6f 73 65 | maps mo|st close|
|000019e0| 6c 79 20 74 6f 20 74 68 | 65 20 63 6f 6c 6f 72 20 |ly to th|e color |
|000019f0| 79 6f 75 20 73 75 62 6d | 69 74 74 65 64 2e 20 54 |you subm|itted. T|
|00001a00| 68 65 20 43 6f 6c 6f 72 | 20 4d 61 6e 61 67 65 72 |he Color| Manager|
|00001a10| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 69 6e 64 | returns| the ind|
|00001a20| 65 78 20 74 6f 20 74 68 | 65 20 62 65 73 74 20 63 |ex to th|e best c|
|00001a30| 6f 6c 6f 72 2c 20 61 6e | 64 20 43 6f 6c 6f 72 20 |olor, an|d Color |
|00001a40| 51 75 69 63 6b 44 72 61 | 77 20 70 75 74 73 20 74 |QuickDra|w puts t|
|00001a50| 68 65 20 69 6e 64 65 78 | 20 76 61 6c 75 65 20 69 |he index| value i|
|00001a60| 6e 20 74 68 65 20 66 67 | 43 6f 6c 6f 72 20 66 69 |n the fg|Color fi|
|00001a70| 65 6c 64 20 6f 66 20 79 | 6f 75 72 20 61 70 70 6c |eld of y|our appl|
|00001a80| 69 63 61 74 69 6f 6e d5 | 73 20 43 47 72 61 66 50 |ication.|s CGrafP|
|00001a90| 6f 72 74 20 72 65 63 6f | 72 64 2e 0d 4e 6f 74 65 |ort reco|rd..Note|
|00001aa0| 0d 51 75 69 63 6b 44 72 | 61 77 20 61 6e 64 20 74 |.QuickDr|aw and t|
|00001ab0| 68 65 20 50 61 6c 65 74 | 74 65 20 4d 61 6e 61 67 |he Palet|te Manag|
|00001ac0| 65 72 20 61 6c 73 6f 20 | 75 73 65 20 43 6f 6c 6f |er also |use Colo|
|00001ad0| 72 20 4d 61 6e 61 67 65 | 72 20 72 6f 75 74 69 6e |r Manage|r routin|
|00001ae0| 65 73 20 74 6f 20 63 68 | 61 6e 67 65 20 74 68 65 |es to ch|ange the|
|00001af0| 20 65 6e 74 72 69 65 73 | 20 69 6e 20 61 20 64 65 | entries| in a de|
|00001b00| 76 69 63 65 d5 73 20 43 | 4c 55 54 2e 20 41 70 70 |vice.s C|LUT. App|
|00001b10| 6c 69 63 61 74 69 6f 6e | 73 20 74 68 61 74 20 64 |lication|s that d|
|00001b20| 6f 20 63 6f 6c 6f 72 20 | 70 61 69 6e 74 69 6e 67 |o color |painting|
|00001b30| 20 61 6e 64 20 61 6e 69 | 6d 61 74 69 6f 6e 20 6e | and ani|mation n|
|00001b40| 65 65 64 20 74 6f 20 63 | 6f 6e 74 72 6f 6c 20 74 |eed to c|ontrol t|
|00001b50| 68 65 20 70 72 65 63 69 | 73 65 20 63 6f 6c 6f 72 |he preci|se color|
|00001b60| 73 20 74 68 65 79 20 75 | 73 65 3b 20 74 68 65 79 |s they u|se; they|
|00001b70| 20 73 68 6f 75 6c 64 20 | 75 73 65 20 74 68 65 20 | should |use the |
|00001b80| 50 61 6c 65 74 74 65 20 | 4d 61 6e 61 67 65 72 20 |Palette |Manager |
|00001b90| 74 6f 20 61 6c 6c 6f 63 | 61 74 65 20 63 6f 6c 6f |to alloc|ate colo|
|00001ba0| 72 73 2e 20 50 61 6c 65 | 74 74 65 20 4d 61 6e 61 |rs. Pale|tte Mana|
|00001bb0| 67 65 72 20 72 6f 75 74 | 69 6e 65 73 20 6f 70 65 |ger rout|ines ope|
|00001bc0| 72 61 74 65 20 74 72 61 | 6e 73 70 61 72 65 6e 74 |rate tra|nsparent|
|00001bd0| 6c 79 20 61 63 72 6f 73 | 73 20 6d 75 6c 74 69 70 |ly acros|s multip|
|00001be0| 6c 65 20 73 63 72 65 65 | 6e 73 2c 20 62 75 74 20 |le scree|ns, but |
|00001bf0| 43 6f 6c 6f 72 20 4d 61 | 6e 61 67 65 72 20 72 6f |Color Ma|nager ro|
|00001c00| 75 74 69 6e 65 73 20 64 | 6f 20 6e 6f 74 2e 20 13 |utines d|o not. .|
|00001c10| 75 0d 0d 54 68 65 20 73 | 65 63 74 69 6f 6e 73 20 |u..The s|ections |
|00001c20| 74 68 61 74 20 66 6f 6c | 6c 6f 77 20 64 65 73 63 |that fol|low desc|
|00001c30| 72 69 62 65 20 68 6f 77 | 20 74 68 65 20 43 6f 6c |ribe how| the Col|
|00001c40| 6f 72 20 4d 61 6e 61 67 | 65 72 20 73 65 6c 65 63 |or Manag|er selec|
|00001c50| 74 73 20 66 72 6f 6d 20 | 63 6f 6c 6f 72 73 20 61 |ts from |colors a|
|00001c60| 76 61 69 6c 61 62 6c 65 | 20 6f 6e 20 74 68 65 20 |vailable| on the |
|00001c70| 43 4c 55 54 20 74 6f 20 | 73 61 74 69 73 66 79 20 |CLUT to |satisfy |
|00001c80| 52 47 42 20 63 6f 6c 6f | 72 20 72 65 71 75 65 73 |RGB colo|r reques|
|00001c90| 74 73 2e 20 0d 0d 47 72 | 61 70 68 69 63 73 20 44 |ts. ..Gr|aphics D|
|00001ca0| 65 76 69 63 65 73 0d 0d | 54 68 65 20 43 6f 6c 6f |evices..|The Colo|
|00001cb0| 72 20 4d 61 6e 61 67 65 | 72 2c 20 6c 69 6b 65 20 |r Manage|r, like |
|00001cc0| 43 6f 6c 6f 72 20 51 75 | 69 63 6b 44 72 61 77 2c |Color Qu|ickDraw,|
|00001cd0| 20 61 63 63 65 73 73 65 | 73 20 61 20 70 61 72 74 | accesse|s a part|
|00001ce0| 69 63 75 6c 61 72 20 67 | 72 61 70 68 69 63 73 20 |icular g|raphics |
|00001cf0| 64 65 76 69 63 65 20 74 | 68 72 6f 75 67 68 20 61 |device t|hrough a|
|00001d00| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 20 | data st|ructure |
|00001d10| 6b 6e 6f 77 6e 20 61 73 | 20 61 20 47 44 65 76 69 |known as| a GDevi|
|00001d20| 63 65 20 72 65 63 6f 72 | 64 2e 20 45 61 63 68 20 |ce recor|d. Each |
|00001d30| 47 44 65 76 69 63 65 20 | 72 65 63 6f 72 64 20 73 |GDevice |record s|
|00001d40| 74 6f 72 65 73 20 69 6e | 66 6f 72 6d 61 74 69 6f |tores in|formatio|
|00001d50| 6e 20 61 62 6f 75 74 20 | 61 20 70 61 72 74 69 63 |n about |a partic|
|00001d60| 75 6c 61 72 20 67 72 61 | 70 68 69 63 73 20 64 65 |ular gra|phics de|
|00001d70| 76 69 63 65 3b 20 61 66 | 74 65 72 20 74 68 69 73 |vice; af|ter this|
|00001d80| 20 72 65 63 6f 72 64 20 | 69 73 20 69 6e 69 74 69 | record |is initi|
|00001d90| 61 6c 69 7a 65 64 2c 20 | 74 68 65 20 64 65 76 69 |alized, |the devi|
|00001da0| 63 65 20 69 74 73 65 6c | 66 20 69 73 20 6b 6e 6f |ce itsel|f is kno|
|00001db0| 77 6e 20 74 6f 20 74 68 | 65 20 43 6f 6c 6f 72 20 |wn to th|e Color |
|00001dc0| 4d 61 6e 61 67 65 72 20 | 61 6e 64 20 51 75 69 63 |Manager |and Quic|
|00001dd0| 6b 44 72 61 77 20 74 68 | 72 6f 75 67 68 20 74 68 |kDraw th|rough th|
|00001de0| 61 74 20 47 44 65 76 69 | 63 65 20 72 65 63 6f 72 |at GDevi|ce recor|
|00001df0| 64 2e 20 53 65 65 20 74 | 68 65 20 63 68 61 70 74 |d. See t|he chapt|
|00001e00| 65 72 20 d2 49 6e 74 72 | 6f 64 75 63 74 69 6f 6e |er .Intr|oduction|
|00001e10| 20 74 6f 20 4d 61 63 69 | 6e 74 6f 73 68 20 49 6d | to Maci|ntosh Im|
|00001e20| 61 67 69 6e 67 d3 20 66 | 6f 72 20 61 6e 20 69 6e |aging. f|or an in|
|00001e30| 74 72 6f 64 75 63 74 69 | 6f 6e 20 74 6f 20 67 72 |troducti|on to gr|
|00001e40| 61 70 68 69 63 20 64 65 | 76 69 63 65 73 20 61 6e |aphic de|vices an|
|00001e50| 64 20 69 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e |d initia|lization|
|00001e60| 2c 20 61 6e 64 20 73 65 | 65 20 74 68 65 20 63 68 |, and se|e the ch|
|00001e70| 61 70 74 65 72 20 d2 47 | 72 61 70 68 69 63 73 20 |apter .G|raphics |
|00001e80| 57 6f 72 6c 64 73 d3 20 | 66 6f 72 20 64 65 74 61 |Worlds. |for deta|
|00001e90| 69 6c 73 20 6f 6e 20 74 | 68 65 20 47 44 65 76 69 |ils on t|he GDevi|
|00001ea0| 63 65 20 72 65 63 6f 72 | 64 20 66 6f 72 6d 61 74 |ce recor|d format|
|00001eb0| 20 61 6e 64 20 74 68 65 | 20 72 6f 75 74 69 6e 65 | and the| routine|
|00001ec0| 73 20 74 68 61 74 20 61 | 6c 6c 6f 77 20 61 6e 20 |s that a|llow an |
|00001ed0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 74 6f 20 61 |applicat|ion to a|
|00001ee0| 63 63 65 73 73 20 61 20 | 67 69 76 65 6e 20 64 65 |ccess a |given de|
|00001ef0| 76 69 63 65 2e 20 52 65 | 6d 65 6d 62 65 72 20 74 |vice. Re|member t|
|00001f00| 68 61 74 20 61 20 67 72 | 61 70 68 69 63 73 20 64 |hat a gr|aphics d|
|00001f10| 65 76 69 63 65 2c 20 72 | 65 70 72 65 73 65 6e 74 |evice, r|epresent|
|00001f20| 65 64 20 62 79 20 61 20 | 47 44 65 76 69 63 65 20 |ed by a |GDevice |
|00001f30| 72 65 63 6f 72 64 2c 20 | 69 73 20 61 20 6c 6f 67 |record, |is a log|
|00001f40| 69 63 61 6c 20 64 65 76 | 69 63 65 20 74 68 61 74 |ical dev|ice that|
|00001f50| 20 74 68 65 20 73 6f 66 | 74 77 61 72 65 20 74 72 | the sof|tware tr|
|00001f60| 65 61 74 73 20 69 64 65 | 6e 74 69 63 61 6c 6c 79 |eats ide|ntically|
|00001f70| 20 77 68 65 74 68 65 72 | 20 69 74 20 69 73 20 61 | whether| it is a|
|00001f80| 20 76 69 64 65 6f 20 63 | 61 72 64 2c 20 61 20 64 | video c|ard, a d|
|00001f90| 69 73 70 6c 61 79 20 64 | 65 76 69 63 65 2c 20 6f |isplay d|evice, o|
|00001fa0| 72 20 61 6e 20 6f 66 66 | 73 63 72 65 65 6e 20 67 |r an off|screen g|
|00001fb0| 72 61 70 68 69 63 73 20 | 77 6f 72 6c 64 2e 20 54 |raphics |world. T|
|00001fc0| 68 65 20 43 6f 6c 6f 72 | 20 4d 61 6e 61 67 65 72 |he Color| Manager|
|00001fd0| 20 75 73 65 73 20 66 69 | 65 6c 64 73 20 6f 66 20 | uses fi|elds of |
|00001fe0| 74 68 65 20 47 44 65 76 | 69 63 65 20 72 65 63 6f |the GDev|ice reco|
|00001ff0| 72 64 20 74 6f 20 74 72 | 61 63 6b 20 61 70 70 6c |rd to tr|ack appl|
|00002000| 69 63 61 74 69 6f 6e 2d | 64 65 66 69 6e 65 64 20 |ication-|defined |
|00002010| 72 6f 75 74 69 6e 65 73 | 20 61 6e 64 20 74 6f 20 |routines| and to |
|00002020| 6d 61 6e 61 67 65 20 74 | 68 65 20 64 65 76 69 63 |manage t|he devic|
|00002030| 65 20 43 4c 55 54 2e 2e | 20 0d 54 68 65 20 43 6f |e CLUT..| .The Co|
|00002040| 6c 6f 72 20 4d 61 6e 61 | 67 65 72 20 75 73 65 73 |lor Mana|ger uses|
|00002050| 20 74 68 72 65 65 20 66 | 69 65 6c 64 73 20 6f 66 | three f|ields of|
|00002060| 20 61 20 47 44 65 76 69 | 63 65 20 72 65 63 6f 72 | a GDevi|ce recor|
|00002070| 64 20 74 6f 20 74 72 61 | 63 6b 20 61 70 70 6c 69 |d to tra|ck appli|
|00002080| 63 61 74 69 6f 6e 2d 64 | 65 66 69 6e 65 64 20 63 |cation-d|efined c|
|00002090| 75 73 74 6f 6d 20 73 65 | 61 72 63 68 20 61 6e 64 |ustom se|arch and|
|000020a0| 20 63 6f 6d 70 6c 65 6d | 65 6e 74 20 70 72 6f 63 | complem|ent proc|
|000020b0| 65 64 75 72 65 73 2e 20 | 54 68 65 20 67 64 53 65 |edures. |The gdSe|
|000020c0| 61 72 63 68 50 72 6f 63 | 20 66 69 65 6c 64 20 63 |archProc| field c|
|000020d0| 6f 6e 74 61 69 6e 73 20 | 61 20 68 61 6e 64 6c 65 |ontains |a handle|
|000020e0| 20 74 6f 20 61 20 6c 69 | 73 74 20 6f 66 20 73 65 | to a li|st of se|
|000020f0| 61 72 63 68 20 70 72 6f | 63 65 64 75 72 65 73 2c |arch pro|cedures,|
|00002100| 20 61 6e 64 20 74 68 65 | 20 67 64 43 6f 6d 70 50 | and the| gdCompP|
|00002110| 72 6f 63 20 66 69 65 6c | 64 20 63 6f 6e 74 61 69 |roc fiel|d contai|
|00002120| 6e 73 20 61 20 68 61 6e | 64 6c 65 20 74 6f 20 61 |ns a han|dle to a|
|00002130| 20 6c 69 73 74 20 6f 66 | 20 63 6f 6c 6f 72 20 63 | list of| color c|
|00002140| 6f 6d 70 6c 65 6d 65 6e | 74 20 70 72 6f 63 65 64 |omplemen|t proced|
|00002150| 75 72 65 73 2e 20 49 6e | 20 65 61 63 68 20 6c 69 |ures. In| each li|
|00002160| 73 74 20 74 68 65 20 43 | 6f 6c 6f 72 20 4d 61 6e |st the C|olor Man|
|00002170| 61 67 65 72 d5 73 20 64 | 65 66 61 75 6c 74 20 70 |ager.s d|efault p|
|00002180| 72 6f 63 65 64 75 72 65 | 20 69 73 20 61 74 20 74 |rocedure| is at t|
|00002190| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 6c 69 |he end o|f the li|
|000021a0| 73 74 2c 20 74 6f 20 62 | 65 20 75 73 65 64 20 69 |st, to b|e used i|
|000021b0| 66 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 6f |f there |are no o|
|000021c0| 74 68 65 72 73 2c 20 6f | 72 20 69 66 20 74 68 65 |thers, o|r if the|
|000021d0| 79 20 66 61 69 6c 2e 20 | 54 68 65 20 67 64 49 64 |y fail. |The gdId|
|000021e0| 20 66 69 65 6c 64 20 63 | 6f 6e 74 61 69 6e 73 20 | field c|ontains |
|000021f0| 61 6e 20 69 64 65 6e 74 | 69 66 69 65 72 20 74 6f |an ident|ifier to|
|00002200| 20 63 6f 6e 6e 65 63 74 | 20 61 20 70 61 72 74 69 | connect| a parti|
|00002210| 63 75 6c 61 72 20 63 75 | 73 74 6f 6d 20 70 72 6f |cular cu|stom pro|
|00002220| 63 65 64 75 72 65 20 77 | 69 74 68 20 74 68 65 20 |cedure w|ith the |
|00002230| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 74 68 61 74 |applicat|ion that|
|00002240| 20 63 72 65 61 74 65 64 | 20 69 74 2e 0d 54 77 6f | created| it..Two|
|00002250| 20 66 69 65 6c 64 73 20 | 6f 66 20 74 68 65 20 47 | fields |of the G|
|00002260| 44 65 76 69 63 65 20 72 | 65 63 6f 72 64 20 63 6f |Device r|ecord co|
|00002270| 6e 74 61 69 6e 20 68 61 | 6e 64 6c 65 73 20 74 6f |ntain ha|ndles to|
|00002280| 20 74 61 62 6c 65 73 20 | 74 68 61 74 20 74 68 65 | tables |that the|
|00002290| 20 43 6f 6c 6f 72 20 4d | 61 6e 61 67 65 72 20 75 | Color M|anager u|
|000022a0| 73 65 73 20 74 6f 20 73 | 70 65 63 69 66 79 20 61 |ses to s|pecify a|
|000022b0| 6e 64 20 6c 6f 6f 6b 20 | 75 70 20 74 68 65 20 63 |nd look |up the c|
|000022c0| 6f 6c 6f 72 73 20 69 6e | 20 61 20 64 65 76 69 63 |olors in| a devic|
|000022d0| 65 d5 73 20 43 4c 55 54 | 2e 20 54 68 65 20 67 64 |e.s CLUT|. The gd|
|000022e0| 50 4d 61 70 20 66 69 65 | 6c 64 20 63 6f 6e 74 61 |PMap fie|ld conta|
|000022f0| 69 6e 73 20 61 20 68 61 | 6e 64 6c 65 20 74 6f 20 |ins a ha|ndle to |
|00002300| 74 68 65 20 70 69 78 65 | 6c 20 6d 61 70 20 66 6f |the pixe|l map fo|
|00002310| 72 20 74 68 65 20 64 65 | 76 69 63 65 2e 20 54 68 |r the de|vice. Th|
|00002320| 65 20 70 69 78 65 6c 20 | 6d 61 70 20 69 6e 20 74 |e pixel |map in t|
|00002330| 75 72 6e 20 63 6f 6e 74 | 61 69 6e 73 20 61 20 68 |urn cont|ains a h|
|00002340| 61 6e 64 6c 65 20 74 6f | 20 74 68 65 20 43 6f 6c |andle to| the Col|
|00002350| 6f 72 54 61 62 6c 65 20 | 72 65 63 6f 72 64 20 74 |orTable |record t|
|00002360| 68 61 74 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |hat cont|ains the|
|00002370| 20 63 6f 6c 6f 72 73 20 | 63 75 72 72 65 6e 74 6c | colors |currentl|
|00002380| 79 20 6c 6f 61 64 65 64 | 20 69 6e 20 74 68 65 20 |y loaded| in the |
|00002390| 43 4c 55 54 2e 20 54 68 | 65 20 67 64 49 54 61 62 |CLUT. Th|e gdITab|
|000023a0| 6c 65 20 66 69 65 6c 64 | 20 63 6f 6e 74 61 69 6e |le field| contain|
|000023b0| 73 20 61 20 68 61 6e 64 | 6c 65 20 74 6f 20 61 6e |s a hand|le to an|
|000023c0| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 20 74 | inverse| table t|
|000023d0| 68 61 74 20 74 68 65 20 | 43 6f 6c 6f 72 20 4d 61 |hat the |Color Ma|
|000023e0| 6e 61 67 65 72 20 63 72 | 65 61 74 65 73 20 61 6e |nager cr|eates an|
|000023f0| 64 20 6d 61 69 6e 74 61 | 69 6e 73 20 61 73 20 61 |d mainta|ins as a|
|00002400| 20 6d 65 61 6e 73 20 6f | 66 20 71 75 69 63 6b 6c | means o|f quickl|
|00002410| 79 20 66 69 6e 64 69 6e | 67 20 63 6f 6c 6f 72 73 |y findin|g colors|
|00002420| 20 69 6e 20 74 68 65 20 | 63 6f 6c 6f 72 20 74 61 | in the |color ta|
|00002430| 62 6c 65 2e 0d 0d 43 6f | 6c 6f 72 20 54 61 62 6c |ble...Co|lor Tabl|
|00002440| 65 73 0d 0d 54 68 65 20 | 63 6f 6d 70 6c 65 74 65 |es..The |complete|
|00002450| 20 73 65 74 20 6f 66 20 | 63 6f 6c 6f 72 73 20 61 | set of |colors a|
|00002460| 76 61 69 6c 61 62 6c 65 | 20 61 74 20 61 20 67 69 |vailable| at a gi|
|00002470| 76 65 6e 20 74 69 6d 65 | 20 66 6f 72 20 61 6e 20 |ven time| for an |
|00002480| 69 6e 64 65 78 65 64 2d | 70 69 78 65 6c 20 64 65 |indexed-|pixel de|
|00002490| 76 69 63 65 20 69 73 20 | 63 6f 6e 74 61 69 6e 65 |vice is |containe|
|000024a0| 64 20 69 6e 20 61 20 43 | 6f 6c 6f 72 54 61 62 6c |d in a C|olorTabl|
|000024b0| 65 20 72 65 63 6f 72 64 | 2e 20 54 68 65 20 43 6f |e record|. The Co|
|000024c0| 6c 6f 72 54 61 62 6c 65 | 20 72 65 63 6f 72 64 20 |lorTable| record |
|000024d0| 69 73 20 64 65 66 69 6e | 65 64 20 6f 6e 20 70 61 |is defin|ed on pa|
|000024e0| 67 65 20 78 78 78 20 6f | 66 20 74 68 65 20 63 68 |ge xxx o|f the ch|
|000024f0| 61 70 74 65 72 20 d2 43 | 6f 6c 6f 72 20 51 75 69 |apter .C|olor Qui|
|00002500| 63 6b 44 72 61 77 2e d3 | 20 49 74 73 20 66 6f 72 |ckDraw..| Its for|
|00002510| 6d 61 74 20 69 73 20 61 | 73 20 66 6f 6c 6c 6f 77 |mat is a|s follow|
|00002520| 73 3a 0d 54 59 50 45 0d | 09 43 6f 6c 6f 72 54 61 |s:.TYPE.|.ColorTa|
|00002530| 62 6c 65 09 09 09 09 3d | 20 0d 09 52 45 43 4f 52 |ble....=| ..RECOR|
|00002540| 44 0d 09 09 63 74 53 65 | 65 64 3a 09 09 09 4c 6f |D...ctSe|ed:...Lo|
|00002550| 6e 67 49 6e 74 3b 09 09 | 09 7b 75 6e 69 71 75 65 |ngInt;..|.{unique|
|00002560| 20 69 64 65 6e 74 69 66 | 69 65 72 20 66 72 6f 6d | identif|ier from|
|00002570| 20 09 09 74 61 62 6c 65 | 7d 0d 09 09 63 74 46 6c | ..table|}...ctFl|
|00002580| 61 67 73 3a 09 09 09 49 | 6e 74 65 67 65 72 3b 09 |ags:...I|nteger;.|
|00002590| 09 09 7b 68 69 67 68 20 | 62 69 74 20 69 73 20 73 |..{high |bit is s|
|000025a0| 65 74 20 66 6f 72 20 61 | 20 7d 0d 09 09 09 09 09 |et for a| }......|
|000025b0| 09 20 09 09 7b 20 47 44 | 65 76 69 63 65 2c 20 63 |. ..{ GD|evice, c|
|000025c0| 6c 65 61 72 20 66 6f 72 | 20 61 20 70 69 78 4d 61 |lear for| a pixMa|
|000025d0| 70 7d 0d 09 09 63 74 53 | 69 7a 65 3a 09 09 09 49 |p}...ctS|ize:...I|
|000025e0| 6e 74 65 67 65 72 3b 09 | 09 09 7b 4e 75 6d 62 65 |nteger;.|..{Numbe|
|000025f0| 72 20 6f 66 20 65 6e 74 | 72 69 65 73 20 69 6e 20 |r of ent|ries in |
|00002600| 74 61 62 6c 65 2d 31 7d | 0d 09 09 63 74 54 61 62 |table-1}|...ctTab|
|00002610| 6c 65 3a 09 09 09 63 53 | 70 65 63 41 72 72 61 79 |le:...cS|pecArray|
|00002620| 0d 09 45 4e 44 3b 0d 09 | 54 68 65 20 63 74 53 65 |..END;..|The ctSe|
|00002630| 65 64 20 66 69 65 6c 64 | 20 63 6f 6e 74 61 69 6e |ed field| contain|
|00002640| 73 20 61 20 76 65 72 73 | 69 6f 6e 20 69 64 65 6e |s a vers|ion iden|
|00002650| 74 69 66 69 65 72 20 66 | 6f 72 20 74 68 65 20 63 |tifier f|or the c|
|00002660| 6f 6c 6f 72 20 74 61 62 | 6c 65 2e 20 49 74 73 20 |olor tab|le. Its |
|00002670| 76 61 6c 75 65 20 69 73 | 20 61 20 75 6e 69 71 75 |value is| a uniqu|
|00002680| 65 20 6e 75 6d 62 65 72 | 20 68 69 67 68 65 72 20 |e number| higher |
|00002690| 74 68 61 6e 20 6d 69 6e | 53 65 65 64 2c 20 61 20 |than min|Seed, a |
|000026a0| 70 72 65 64 65 66 69 6e | 65 64 20 63 6f 6e 73 74 |predefin|ed const|
|000026b0| 61 6e 74 20 77 69 74 68 | 20 61 20 76 61 6c 75 65 |ant with| a value|
|000026c0| 20 6f 66 20 31 30 32 33 | 2e 20 28 49 66 20 61 20 | of 1023|. (If a |
|000026d0| 63 6f 6c 6f 72 20 74 61 | 62 6c 65 20 69 73 20 63 |color ta|ble is c|
|000026e0| 72 65 61 74 65 64 20 66 | 72 6f 6d 20 61 20 72 65 |reated f|rom a re|
|000026f0| 73 6f 75 72 63 65 2c 20 | 69 74 73 20 72 65 73 6f |source, |its reso|
|00002700| 75 72 63 65 20 6e 75 6d | 62 65 72 20 62 65 63 6f |urce num|ber beco|
|00002710| 6d 65 73 20 74 68 65 20 | 69 6e 69 74 69 61 6c 20 |mes the |initial |
|00002720| 63 74 53 65 65 64 2e 29 | 20 56 61 6c 75 65 73 20 |ctSeed.)| Values |
|00002730| 6f 66 20 31 30 32 33 20 | 61 6e 64 20 62 65 6c 6f |of 1023 |and belo|
|00002740| 77 20 61 72 65 20 72 65 | 73 65 72 76 65 64 20 66 |w are re|served f|
|00002750| 6f 72 20 73 74 61 6e 64 | 61 72 64 20 63 6f 6c 6f |or stand|ard colo|
|00002760| 72 20 74 61 62 6c 65 73 | 20 64 65 66 69 6e 65 64 |r tables| defined|
|00002770| 20 62 79 20 43 6f 6c 6f | 72 20 51 75 69 63 6b 44 | by Colo|r QuickD|
|00002780| 72 61 77 2e 20 43 6f 6c | 6f 72 20 74 61 62 6c 65 |raw. Col|or table|
|00002790| 73 20 74 68 61 74 20 61 | 72 65 20 70 61 72 74 20 |s that a|re part |
|000027a0| 6f 66 20 61 20 47 44 65 | 76 69 63 65 20 72 65 63 |of a GDe|vice rec|
|000027b0| 6f 72 64 20 61 6c 77 61 | 79 73 20 68 61 76 65 20 |ord alwa|ys have |
|000027c0| 74 68 65 20 68 69 67 68 | 20 62 69 74 20 6f 66 20 |the high| bit of |
|000027d0| 74 68 65 20 63 74 46 6c | 61 67 73 20 66 69 65 6c |the ctFl|ags fiel|
|000027e0| 64 20 73 65 74 2e 20 28 | 43 6f 6c 6f 72 20 74 61 |d set. (|Color ta|
|000027f0| 62 6c 65 73 20 74 68 61 | 74 20 61 72 65 20 70 61 |bles tha|t are pa|
|00002800| 72 74 20 6f 66 20 70 69 | 78 65 6c 20 6d 61 70 73 |rt of pi|xel maps|
|00002810| 20 6e 6f 74 20 61 73 73 | 6f 63 69 61 74 65 64 20 | not ass|ociated |
|00002820| 77 69 74 68 20 61 20 47 | 44 65 76 69 63 65 20 72 |with a G|Device r|
|00002830| 65 63 6f 72 64 20 68 61 | 76 65 20 74 68 69 73 20 |ecord ha|ve this |
|00002840| 62 69 74 20 63 6c 65 61 | 72 2e 29 0d 54 68 65 20 |bit clea|r.).The |
|00002850| 63 74 54 61 62 6c 65 20 | 66 69 65 6c 64 20 63 6f |ctTable |field co|
|00002860| 6e 74 61 69 6e 73 20 61 | 6e 20 61 72 72 61 79 20 |ntains a|n array |
|00002870| 6f 66 20 43 6f 6c 6f 72 | 53 70 65 63 20 65 6e 74 |of Color|Spec ent|
|00002880| 72 69 65 73 2e 20 54 68 | 65 20 74 79 70 65 20 43 |ries. Th|e type C|
|00002890| 6f 6c 6f 72 53 70 65 63 | 20 63 6f 6e 73 69 73 74 |olorSpec| consist|
|000028a0| 73 20 6f 66 20 61 6e 20 | 69 6e 74 65 67 65 72 20 |s of an |integer |
|000028b0| 76 61 6c 75 65 20 61 6e | 64 20 61 6e 20 52 47 42 |value an|d an RGB|
|000028c0| 20 63 6f 6c 6f 72 2c 20 | 61 73 20 73 68 6f 77 6e | color, |as shown|
|000028d0| 20 69 6e 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | in the |followin|
|000028e0| 67 20 73 70 65 63 69 66 | 69 63 61 74 69 6f 6e 2e |g specif|ication.|
|000028f0| 20 0d 54 59 50 45 0d 09 | 43 6f 6c 6f 72 53 70 65 | .TYPE..|ColorSpe|
|00002900| 63 20 3d 20 0d 09 52 45 | 43 4f 52 44 0d 09 09 76 |c = ..RE|CORD...v|
|00002910| 61 6c 75 65 09 09 3a 20 | 49 6e 74 65 67 65 72 3b |alue..: |Integer;|
|00002920| 20 7b 43 6f 6c 6f 72 20 | 72 65 70 72 65 73 65 6e | {Color |represen|
|00002930| 74 61 74 69 6f 6e 7d 0d | 09 09 72 67 62 09 09 3a |tation}.|..rgb..:|
|00002940| 20 52 47 42 43 6f 6c 6f | 72 20 7b 43 6f 6c 6f 72 | RGBColo|r {Color|
|00002950| 20 76 61 6c 75 65 7d 0d | 09 45 4e 44 3b 0d 49 6e | value}.|.END;.In|
|00002960| 20 63 6f 6c 6f 72 20 74 | 61 62 6c 65 73 20 66 6f | color t|ables fo|
|00002970| 72 20 73 63 72 65 65 6e | 20 64 65 76 69 63 65 73 |r screen| devices|
|00002980| 2c 20 74 68 65 20 43 6f | 6c 6f 72 20 4d 61 6e 61 |, the Co|lor Mana|
|00002990| 67 65 72 20 61 6e 64 20 | 50 61 6c 65 74 74 65 20 |ger and |Palette |
|000029a0| 4d 61 6e 61 67 65 72 20 | 75 73 65 20 74 68 65 20 |Manager |use the |
|000029b0| 76 61 6c 75 65 20 66 69 | 65 6c 64 20 74 6f 20 63 |value fi|eld to c|
|000029c0| 6f 6e 74 61 69 6e 20 63 | 6f 6c 6f 72 20 6d 61 74 |ontain c|olor mat|
|000029d0| 63 68 69 6e 67 20 61 6e | 64 20 70 72 6f 74 65 63 |ching an|d protec|
|000029e0| 74 69 6f 6e 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |tion inf|ormation|
|000029f0| 3b 20 69 6e 20 73 75 63 | 68 20 74 61 62 6c 65 73 |; in suc|h tables|
|00002a00| 2c 20 74 68 65 20 69 6e | 64 65 78 20 66 6f 72 20 |, the in|dex for |
|00002a10| 61 20 70 61 72 74 69 63 | 75 6c 61 72 20 52 47 42 |a partic|ular RGB|
|00002a20| 43 6f 6c 6f 72 20 69 73 | 20 64 65 74 65 72 6d 69 |Color is| determi|
|00002a30| 6e 65 64 20 62 79 20 69 | 74 73 20 70 6f 73 69 74 |ned by i|ts posit|
|00002a40| 69 6f 6e 20 69 6e 20 74 | 68 65 20 74 61 62 6c 65 |ion in t|he table|
|00002a50| 2c 20 6e 6f 74 20 62 79 | 20 74 68 65 20 63 6f 6e |, not by| the con|
|00002a60| 74 65 6e 74 73 20 6f 66 | 20 74 68 65 20 76 61 6c |tents of| the val|
|00002a70| 75 65 20 66 69 65 6c 64 | 2e 20 0d 0d 49 6e 76 65 |ue field|. ..Inve|
|00002a80| 72 73 65 20 54 61 62 6c | 65 73 0d 0d 54 68 65 20 |rse Tabl|es..The |
|00002a90| 43 6f 6c 6f 72 20 4d 61 | 6e 61 67 65 72 20 63 6f |Color Ma|nager co|
|00002aa0| 6e 73 74 72 75 63 74 73 | 20 69 6e 76 65 72 73 65 |nstructs| inverse|
|00002ab0| 20 74 61 62 6c 65 73 20 | 69 6e 20 6f 72 64 65 72 | tables |in order|
|00002ac0| 20 74 6f 20 72 65 6d 61 | 70 20 74 68 65 20 69 6e | to rema|p the in|
|00002ad0| 66 6f 72 6d 61 74 69 6f | 6e 20 69 6e 20 61 20 64 |formatio|n in a d|
|00002ae0| 65 76 69 63 65 d5 73 20 | 63 6f 6c 6f 72 20 6c 6f |evice.s |color lo|
|00002af0| 6f 6b 75 70 20 74 61 62 | 6c 65 20 73 6f 20 74 68 |okup tab|le so th|
|00002b00| 61 74 2c 20 77 68 65 6e | 20 43 6f 6c 6f 72 20 51 |at, when| Color Q|
|00002b10| 75 69 63 6b 44 72 61 77 | 20 73 75 70 70 6c 69 65 |uickDraw| supplie|
|00002b20| 73 20 61 6e 20 52 47 42 | 20 63 6f 6c 6f 72 2c 20 |s an RGB| color, |
|00002b30| 74 68 65 20 43 6f 6c 6f | 72 20 4d 61 6e 61 67 65 |the Colo|r Manage|
|00002b40| 72 20 63 61 6e 20 71 75 | 69 63 6b 6c 79 20 72 65 |r can qu|ickly re|
|00002b50| 74 75 72 6e 20 74 68 65 | 20 69 6e 64 65 78 20 74 |turn the| index t|
|00002b60| 6f 20 74 68 65 20 63 6c | 6f 73 65 73 74 20 63 6f |o the cl|osest co|
|00002b70| 6c 6f 72 20 61 76 61 69 | 6c 61 62 6c 65 20 69 6e |lor avai|lable in|
|00002b80| 20 74 68 65 20 43 4c 55 | 54 2e 0d 4e 6f 74 65 0d | the CLU|T..Note.|
|00002b90| 54 68 65 20 6d 61 74 65 | 72 69 61 6c 20 69 6e 20 |The mate|rial in |
|00002ba0| 74 68 69 73 20 73 65 63 | 74 69 6f 6e 20 69 73 20 |this sec|tion is |
|00002bb0| 70 72 6f 76 69 64 65 64 | 20 66 6f 72 20 64 65 76 |provided| for dev|
|00002bc0| 65 6c 6f 70 65 72 73 20 | 77 68 6f 20 61 72 65 20 |elopers |who are |
|00002bd0| 70 6c 61 6e 6e 69 6e 67 | 20 74 6f 20 63 72 65 61 |planning| to crea|
|00002be0| 74 65 20 74 68 65 69 72 | 20 6f 77 6e 20 63 6f 6c |te their| own col|
|00002bf0| 6f 72 2d 6d 61 70 70 69 | 6e 67 20 6d 65 74 68 6f |or-mappi|ng metho|
|00002c00| 64 73 3b 20 66 65 77 20 | 70 72 6f 67 72 61 6d 73 |ds; few |programs|
|00002c10| 20 6e 65 65 64 20 74 6f | 20 75 73 65 20 69 6e 76 | need to| use inv|
|00002c20| 65 72 73 65 20 74 61 62 | 6c 65 73 20 64 69 72 65 |erse tab|les dire|
|00002c30| 63 74 6c 79 2c 20 61 6e | 64 20 65 76 65 6e 20 66 |ctly, an|d even f|
|00002c40| 65 77 65 72 20 6e 65 65 | 64 20 74 6f 20 63 72 65 |ewer nee|d to cre|
|00002c50| 61 74 65 20 74 68 65 69 | 72 20 6f 77 6e 2e 20 13 |ate thei|r own. .|
|00002c60| 75 0d 0d 57 68 65 6e 20 | 61 6e 20 61 70 70 6c 69 |u..When |an appli|
|00002c70| 63 61 74 69 6f 6e 20 73 | 65 74 73 20 74 68 65 20 |cation s|ets the |
|00002c80| 66 6f 72 65 67 72 6f 75 | 6e 64 20 63 6f 6c 6f 72 |foregrou|nd color|
|00002c90| 20 77 69 74 68 20 74 68 | 65 20 52 47 42 46 6f 72 | with th|e RGBFor|
|00002ca0| 65 43 6f 6c 6f 72 20 70 | 72 6f 63 65 64 75 72 65 |eColor p|rocedure|
|00002cb0| 2c 20 61 6e 64 20 74 68 | 65 6e 20 64 72 61 77 73 |, and th|en draws|
|00002cc0| 20 75 73 69 6e 67 20 74 | 68 61 74 20 63 6f 6c 6f | using t|hat colo|
|00002cd0| 72 20 28 77 69 74 68 20 | 61 20 4c 69 6e 65 54 6f |r (with |a LineTo|
|00002ce0| 20 70 72 6f 63 65 64 75 | 72 65 2c 20 66 6f 72 20 | procedu|re, for |
|00002cf0| 65 78 61 6d 70 6c 65 29 | 2c 20 43 6f 6c 6f 72 20 |example)|, Color |
|00002d00| 51 75 69 63 6b 44 72 61 | 77 20 6d 75 73 74 20 64 |QuickDra|w must d|
|00002d10| 65 74 65 72 6d 69 6e 65 | 20 68 6f 77 20 74 6f 20 |etermine| how to |
|00002d20| 64 65 61 6c 20 77 69 74 | 68 20 74 68 65 20 34 38 |deal wit|h the 48|
|00002d30| 20 62 69 74 73 20 6f 66 | 20 74 68 61 74 20 52 47 | bits of| that RG|
|00002d40| 42 43 6f 6c 6f 72 20 72 | 65 63 6f 72 64 2e 20 49 |BColor r|ecord. I|
|00002d50| 66 20 74 68 65 20 6c 69 | 6e 65 20 69 73 20 64 72 |f the li|ne is dr|
|00002d60| 61 77 6e 20 69 6e 74 6f | 20 61 20 70 69 63 74 75 |awn into| a pictu|
|00002d70| 72 65 2c 20 43 6f 6c 6f | 72 20 51 75 69 63 6b 44 |re, Colo|r QuickD|
|00002d80| 72 61 77 20 63 61 6e 20 | 73 74 6f 72 65 20 61 6c |raw can |store al|
|00002d90| 6c 20 34 38 20 62 69 74 | 73 20 6f 66 20 63 6f 6c |l 48 bit|s of col|
|00002da0| 6f 72 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |or infor|mation a|
|00002db0| 6c 6f 6e 67 20 77 69 74 | 68 20 74 68 65 20 6c 69 |long wit|h the li|
|00002dc0| 6e 65 2d 64 72 61 77 69 | 6e 67 20 63 6f 64 65 73 |ne-drawi|ng codes|
|00002dd0| 2e 20 42 75 74 20 77 68 | 65 6e 20 69 74 20 69 73 |. But wh|en it is|
|00002de0| 20 64 72 61 77 6e 20 69 | 6e 74 6f 20 61 20 70 69 | drawn i|nto a pi|
|00002df0| 78 65 6c 20 6d 61 70 2c | 20 73 6f 6d 65 20 63 6f |xel map,| some co|
|00002e00| 6c 6f 72 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |lor info|rmation |
|00002e10| 6d 75 73 74 20 62 65 20 | 64 69 73 63 61 72 64 65 |must be |discarde|
|00002e20| 64 2c 20 62 65 63 61 75 | 73 65 20 65 76 65 6e 20 |d, becau|se even |
|00002e30| 74 68 65 20 64 65 65 70 | 65 73 74 20 70 69 78 65 |the deep|est pixe|
|00002e40| 6c 20 6d 61 70 20 63 61 | 6e 20 6f 6e 6c 79 20 73 |l map ca|n only s|
|00002e50| 74 6f 72 65 20 32 34 20 | 62 69 74 73 20 6f 66 20 |tore 24 |bits of |
|00002e60| 63 6f 6c 6f 72 20 69 6e | 66 6f 72 6d 61 74 69 6f |color in|formatio|
|00002e70| 6e 20 70 65 72 20 70 69 | 78 65 6c 2e 0d 44 72 61 |n per pi|xel..Dra|
|00002e80| 77 69 6e 67 20 69 6e 74 | 6f 20 64 69 72 65 63 74 |wing int|o direct|
|00002e90| 20 70 69 78 65 6c 20 6d | 61 70 73 2c 20 69 6e 20 | pixel m|aps, in |
|00002ea0| 77 68 69 63 68 20 65 61 | 63 68 20 70 69 78 65 6c |which ea|ch pixel|
|00002eb0| 20 76 61 6c 75 65 20 64 | 69 72 65 63 74 6c 79 20 | value d|irectly |
|00002ec0| 73 70 65 63 69 66 69 65 | 73 20 74 68 65 20 72 65 |specifie|s the re|
|00002ed0| 64 2c 20 67 72 65 65 6e | 2c 20 61 6e 64 20 62 6c |d, green|, and bl|
|00002ee0| 75 65 20 63 6f 6d 70 6f | 6e 65 6e 74 73 20 6f 66 |ue compo|nents of|
|00002ef0| 20 61 20 63 6f 6c 6f 72 | 2c 20 69 73 20 73 74 72 | a color|, is str|
|00002f00| 61 69 67 68 74 66 6f 72 | 77 61 72 64 3a 20 43 6f |aightfor|ward: Co|
|00002f10| 6c 6f 72 20 51 75 69 63 | 6b 44 72 61 77 20 74 72 |lor Quic|kDraw tr|
|00002f20| 75 6e 63 61 74 65 73 20 | 6c 6f 77 2d 6f 72 64 65 |uncates |low-orde|
|00002f30| 72 20 62 69 74 73 20 66 | 72 6f 6d 20 65 61 63 68 |r bits f|rom each|
|00002f40| 20 31 36 2d 62 69 74 20 | 63 6f 6c 6f 72 20 63 6f | 16-bit |color co|
|00002f50| 6d 70 6f 6e 65 6e 74 20 | 6f 66 20 74 68 65 20 52 |mponent |of the R|
|00002f60| 47 42 43 6f 6c 6f 72 20 | 72 65 63 6f 72 64 2e 20 |GBColor |record. |
|00002f70| 44 69 72 65 63 74 20 70 | 69 78 65 6c 20 6d 61 70 |Direct p|ixel map|
|00002f80| 73 20 63 61 6e 20 62 65 | 20 65 69 74 68 65 72 20 |s can be| either |
|00002f90| 31 36 20 6f 72 20 33 32 | 20 62 69 74 73 20 64 65 |16 or 32| bits de|
|00002fa0| 65 70 2c 20 77 69 74 68 | 20 65 61 63 68 20 70 69 |ep, with| each pi|
|00002fb0| 78 65 6c 20 76 61 6c 75 | 65 20 63 6f 6e 74 61 69 |xel valu|e contai|
|00002fc0| 6e 69 6e 67 20 31 35 20 | 6f 72 20 32 34 20 62 69 |ning 15 |or 24 bi|
|00002fd0| 74 73 20 6f 66 20 63 6f | 6c 6f 72 20 69 6e 66 6f |ts of co|lor info|
|00002fe0| 72 6d 61 74 69 6f 6e 20 | 28 35 20 6f 72 20 38 20 |rmation |(5 or 8 |
|00002ff0| 62 69 74 73 20 70 65 72 | 20 63 6f 6d 70 6f 6e 65 |bits per| compone|
|00003000| 6e 74 2c 20 77 69 74 68 | 20 74 68 65 20 6f 74 68 |nt, with| the oth|
|00003010| 65 72 20 62 69 74 73 20 | 75 6e 75 73 65 64 29 2e |er bits |unused).|
|00003020| 20 46 69 67 75 72 65 73 | 20 78 78 78 20 61 6e 64 | Figures| xxx and|
|00003030| 20 79 79 79 20 69 6e 20 | 74 68 65 20 63 68 61 70 | yyy in |the chap|
|00003040| 74 65 72 20 d2 43 6f 6c | 6f 72 20 51 75 69 63 6b |ter .Col|or Quick|
|00003050| 44 72 61 77 d3 20 69 6c | 6c 75 73 74 72 61 74 65 |Draw. il|lustrate|
|00003060| 20 68 6f 77 20 43 6f 6c | 6f 72 20 51 75 69 63 6b | how Col|or Quick|
|00003070| 44 72 61 77 20 74 72 75 | 6e 63 61 74 65 73 20 34 |Draw tru|ncates 4|
|00003080| 38 2d 62 69 74 20 52 47 | 42 20 63 6f 6c 6f 72 73 |8-bit RG|B colors|
|00003090| 20 66 6f 72 20 64 69 72 | 65 63 74 20 70 69 78 65 | for dir|ect pixe|
|000030a0| 6c 73 2e 0d 49 6e 64 65 | 78 65 64 20 70 69 78 65 |ls..Inde|xed pixe|
|000030b0| 6c 20 6d 61 70 73 20 64 | 6f 6e d5 74 20 63 6f 6e |l maps d|on.t con|
|000030c0| 74 61 69 6e 20 52 47 42 | 20 63 6f 6c 6f 72 73 3b |tain RGB| colors;|
|000030d0| 20 74 68 65 79 20 63 6f | 6e 74 61 69 6e 20 69 6e | they co|ntain in|
|000030e0| 64 65 78 65 73 20 74 6f | 20 61 20 63 6f 6c 6f 72 |dexes to| a color|
|000030f0| 20 74 61 62 6c 65 20 77 | 68 65 72 65 20 74 68 65 | table w|here the|
|00003100| 20 52 47 42 20 63 6f 6c | 6f 72 73 20 61 72 65 20 | RGB col|ors are |
|00003110| 73 74 6f 72 65 64 2e 20 | 54 68 65 20 63 6f 6c 6f |stored. |The colo|
|00003120| 72 20 74 61 62 6c 65 20 | 6f 66 20 61 20 47 44 65 |r table |of a GDe|
|00003130| 76 69 63 65 20 72 65 63 | 6f 72 64 20 72 65 66 6c |vice rec|ord refl|
|00003140| 65 63 74 73 20 74 68 65 | 20 63 75 72 72 65 6e 74 |ects the| current|
|00003150| 20 43 4c 55 54 20 76 61 | 6c 75 65 73 20 66 6f 72 | CLUT va|lues for|
|00003160| 20 74 68 61 74 20 64 65 | 76 69 63 65 2e 20 57 68 | that de|vice. Wh|
|00003170| 65 6e 20 61 6e 20 61 70 | 70 6c 69 63 61 74 69 6f |en an ap|plicatio|
|00003180| 6e 20 72 65 71 75 65 73 | 74 73 20 61 20 63 6f 6c |n reques|ts a col|
|00003190| 6f 72 20 66 6f 72 20 61 | 6e 20 69 6e 64 65 78 65 |or for a|n indexe|
|000031a0| 64 20 64 65 76 69 63 65 | 2c 20 43 6f 6c 6f 72 20 |d device|, Color |
|000031b0| 51 75 69 63 6b 44 72 61 | 77 20 63 61 6c 6c 73 20 |QuickDra|w calls |
|000031c0| 6f 6e 20 74 68 65 20 43 | 6f 6c 6f 72 20 4d 61 6e |on the C|olor Man|
|000031d0| 61 67 65 72 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |ager to |determin|
|000031e0| 65 20 77 68 69 63 68 20 | 63 6f 6c 6f 72 20 63 75 |e which |color cu|
|000031f0| 72 72 65 6e 74 6c 79 20 | 69 6e 20 74 68 65 20 47 |rrently |in the G|
|00003200| 44 65 76 69 63 65 20 72 | 65 63 6f 72 64 d5 73 20 |Device r|ecord.s |
|00003210| 63 6f 6c 6f 72 20 74 61 | 62 6c 65 20 28 61 6e 64 |color ta|ble (and|
|00003220| 20 68 65 6e 63 65 20 74 | 68 65 20 64 65 76 69 63 | hence t|he devic|
|00003230| 65 d5 73 20 43 4c 55 54 | 29 20 63 6f 6d 65 73 20 |e.s CLUT|) comes |
|00003240| 63 6c 6f 73 65 73 74 20 | 74 6f 20 74 68 65 20 72 |closest |to the r|
|00003250| 65 71 75 65 73 74 65 64 | 20 63 6f 6c 6f 72 2e 20 |equested| color. |
|00003260| 54 68 65 20 43 6f 6c 6f | 72 20 4d 61 6e 61 67 65 |The Colo|r Manage|
|00003270| 72 20 66 75 6e 63 74 69 | 6f 6e 20 43 6f 6c 6f 72 |r functi|on Color|
|00003280| 54 6f 49 6e 64 65 78 20 | 72 65 74 75 72 6e 73 20 |ToIndex |returns |
|00003290| 74 68 65 20 69 6e 64 65 | 78 20 66 6f 72 20 61 20 |the inde|x for a |
|000032a0| 67 69 76 65 6e 20 63 6f | 6c 6f 72 2c 20 61 6e 64 |given co|lor, and|
|000032b0| 20 43 6f 6c 6f 72 20 51 | 75 69 63 6b 44 72 61 77 | Color Q|uickDraw|
|000032c0| 20 73 74 6f 72 65 73 20 | 74 68 61 74 20 69 6e 64 | stores |that ind|
|000032d0| 65 78 20 69 6e 20 74 68 | 65 20 70 69 78 65 6c 20 |ex in th|e pixel |
|000032e0| 6d 61 70 2e 20 49 6e 64 | 65 78 65 64 20 70 69 78 |map. Ind|exed pix|
|000032f0| 65 6c 20 6d 61 70 73 20 | 63 61 6e 20 62 65 20 31 |el maps |can be 1|
|00003300| 2c 20 32 2c 20 34 2c 20 | 6f 72 20 38 20 62 69 74 |, 2, 4, |or 8 bit|
|00003310| 73 20 64 65 65 70 2e 20 | 28 41 20 31 2d 62 69 74 |s deep. |(A 1-bit|
|00003320| 20 70 69 78 65 6c 20 6d | 61 70 20 69 73 20 65 66 | pixel m|ap is ef|
|00003330| 66 65 63 74 69 76 65 6c | 79 20 74 68 65 20 73 61 |fectivel|y the sa|
|00003340| 6d 65 20 61 73 20 61 20 | 62 69 74 6d 61 70 2e 29 |me as a |bitmap.)|
|00003350| 20 54 68 65 20 6d 6f 73 | 74 20 63 6f 6d 6d 6f 6e | The mos|t common|
|00003360| 20 64 65 76 69 63 65 20 | 43 4c 55 54 20 68 61 73 | device |CLUT has|
|00003370| 20 32 35 36 20 65 6e 74 | 72 69 65 73 2c 20 65 61 | 256 ent|ries, ea|
|00003380| 63 68 20 6f 66 20 77 68 | 69 63 68 20 63 61 6e 20 |ch of wh|ich can |
|00003390| 62 65 20 61 64 64 72 65 | 73 73 65 64 20 62 79 20 |be addre|ssed by |
|000033a0| 61 20 70 69 78 65 6c 20 | 6d 61 70 20 74 68 61 74 |a pixel |map that|
|000033b0| 20 69 73 20 38 20 62 69 | 74 73 20 64 65 65 70 2e | is 8 bi|ts deep.|
|000033c0| 20 0d 44 65 74 65 72 6d | 69 6e 69 6e 67 20 74 68 | .Determ|ining th|
|000033d0| 65 20 62 65 73 74 20 63 | 6f 6c 6f 72 20 63 68 6f |e best c|olor cho|
|000033e0| 69 63 65 20 6f 75 74 20 | 6f 66 20 32 35 36 20 63 |ice out |of 256 c|
|000033f0| 61 6e 64 69 64 61 74 65 | 73 20 63 61 6e 20 74 61 |andidate|s can ta|
|00003400| 6b 65 20 61 20 6c 6f 74 | 20 6f 66 20 70 72 6f 63 |ke a lot| of proc|
|00003410| 65 73 73 69 6e 67 20 74 | 69 6d 65 2e 20 54 6f 20 |essing t|ime. To |
|00003420| 73 70 65 65 64 20 75 70 | 20 70 72 6f 63 65 73 73 |speed up| process|
|00003430| 69 6e 67 2c 20 74 68 65 | 20 43 6f 6c 6f 72 20 4d |ing, the| Color M|
|00003440| 61 6e 61 67 65 72 20 62 | 75 69 6c 64 73 20 61 20 |anager b|uilds a |
|00003450| 73 70 65 63 69 61 6c 20 | 74 61 62 6c 65 2c 20 63 |special |table, c|
|00003460| 61 6c 6c 65 64 20 74 68 | 65 20 69 6e 76 65 72 73 |alled th|e invers|
|00003470| 65 20 74 61 62 6c 65 2c | 20 66 6f 72 20 65 76 65 |e table,| for eve|
|00003480| 72 79 20 69 6e 64 65 78 | 65 64 20 64 65 76 69 63 |ry index|ed devic|
|00003490| 65 20 74 68 61 74 20 74 | 68 65 20 53 6c 6f 74 20 |e that t|he Slot |
|000034a0| 4d 61 6e 61 67 65 72 20 | 66 69 6e 64 73 20 61 74 |Manager |finds at|
|000034b0| 20 73 74 61 72 74 75 70 | 2e 20 54 68 65 20 43 6f | startup|. The Co|
|000034c0| 6c 6f 72 20 4d 61 6e 61 | 67 65 72 20 73 74 6f 72 |lor Mana|ger stor|
|000034d0| 65 73 20 61 20 68 61 6e | 64 6c 65 20 74 6f 20 74 |es a han|dle to t|
|000034e0| 68 65 20 69 6e 76 65 72 | 73 65 20 74 61 62 6c 65 |he inver|se table|
|000034f0| 20 69 6e 20 74 68 65 20 | 67 64 49 54 61 62 6c 65 | in the |gdITable|
|00003500| 20 66 69 65 6c 64 20 6f | 66 20 74 68 65 20 47 44 | field o|f the GD|
|00003510| 65 76 69 63 65 20 72 65 | 63 6f 72 64 2e 20 41 6e |evice re|cord. An|
|00003520| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 20 6f | inverse| table o|
|00003530| 72 67 61 6e 69 7a 65 73 | 20 74 68 65 20 69 6e 66 |rganizes| the inf|
|00003540| 6f 72 6d 61 74 69 6f 6e | 20 69 6e 20 61 20 64 65 |ormation| in a de|
|00003550| 76 69 63 65 d5 73 20 43 | 4c 55 54 20 73 6f 20 74 |vice.s C|LUT so t|
|00003560| 68 61 74 2c 20 67 69 76 | 65 6e 20 61 6e 20 52 47 |hat, giv|en an RG|
|00003570| 42 20 63 6f 6c 6f 72 2c | 20 74 68 65 20 69 6e 64 |B color,| the ind|
|00003580| 65 78 20 74 6f 20 74 68 | 65 20 62 65 73 74 20 63 |ex to th|e best c|
|00003590| 6f 6c 6f 72 20 63 61 6e | 20 62 65 20 66 6f 75 6e |olor can| be foun|
|000035a0| 64 20 71 75 69 63 6b 6c | 79 2e 20 49 74 73 20 66 |d quickl|y. Its f|
|000035b0| 6f 72 6d 61 74 20 69 73 | 20 74 68 65 20 69 6e 76 |ormat is| the inv|
|000035c0| 65 72 73 65 20 6f 66 20 | 61 20 63 6f 6c 6f 72 20 |erse of |a color |
|000035d0| 74 61 62 6c 65 3a 20 69 | 6e 73 74 65 61 64 20 6f |table: i|nstead o|
|000035e0| 66 20 61 20 63 6f 6c 6c | 65 63 74 69 6f 6e 20 6f |f a coll|ection o|
|000035f0| 66 20 52 47 42 43 6f 6c | 6f 72 20 72 65 63 6f 72 |f RGBCol|or recor|
|00003600| 64 73 20 74 68 61 74 20 | 63 61 6e 20 62 65 20 6c |ds that |can be l|
|00003610| 6f 6f 6b 65 64 20 75 70 | 20 62 79 20 61 6e 20 69 |ooked up| by an i|
|00003620| 6e 64 65 78 2c 20 74 68 | 65 20 69 6e 76 65 72 73 |ndex, th|e invers|
|00003630| 65 20 74 61 62 6c 65 20 | 63 6f 6e 74 61 69 6e 73 |e table |contains|
|00003640| 20 61 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 20 6f 66 | a colle|ction of|
|00003650| 20 63 6f 6c 6f 72 20 74 | 61 62 6c 65 20 69 6e 64 | color t|able ind|
|00003660| 65 78 65 73 20 74 68 61 | 74 20 63 61 6e 20 62 65 |exes tha|t can be|
|00003670| 20 6c 6f 6f 6b 65 64 20 | 75 70 20 62 79 20 61 6e | looked |up by an|
|00003680| 20 52 47 42 20 76 61 6c | 75 65 2e 0d 54 68 65 20 | RGB val|ue..The |
|00003690| 66 6f 72 6d 61 74 20 6f | 66 20 61 6e 20 69 6e 76 |format o|f an inv|
|000036a0| 65 72 73 65 20 74 61 62 | 6c 65 20 63 61 6e 20 62 |erse tab|le can b|
|000036b0| 65 20 69 6c 6c 75 73 74 | 72 61 74 65 64 20 63 6f |e illust|rated co|
|000036c0| 6d 70 61 63 74 6c 79 20 | 77 69 74 68 20 61 20 68 |mpactly |with a h|
|000036d0| 79 70 6f 74 68 65 74 69 | 63 61 6c 20 63 6f 6c 6f |ypotheti|cal colo|
|000036e0| 72 20 77 6f 72 6c 64 20 | 69 6e 20 77 68 69 63 68 |r world |in which|
|000036f0| 20 52 47 42 20 63 6f 6d | 70 6f 6e 65 6e 74 73 20 | RGB com|ponents |
|00003700| 61 72 65 20 6f 6e 6c 79 | 20 31 20 62 69 74 20 64 |are only| 1 bit d|
|00003710| 65 65 70 20 65 61 63 68 | 2e 20 49 6e 20 46 69 67 |eep each|. In Fig|
|00003720| 75 72 65 20 31 2d 31 2c | 20 74 68 65 20 65 69 67 |ure 1-1,| the eig|
|00003730| 68 74 20 70 6f 73 73 69 | 62 6c 65 20 52 47 42 20 |ht possi|ble RGB |
|00003740| 76 61 6c 75 65 73 20 6f | 66 20 73 75 63 68 20 61 |values o|f such a|
|00003750| 20 77 6f 72 6c 64 20 61 | 72 65 20 74 68 65 20 69 | world a|re the i|
|00003760| 6e 64 65 78 65 73 20 69 | 6e 74 6f 20 61 20 74 61 |ndexes i|nto a ta|
|00003770| 62 6c 65 20 77 68 6f 73 | 65 20 65 6e 74 72 69 65 |ble whos|e entrie|
|00003780| 73 20 63 6f 6e 73 69 73 | 74 20 6f 66 20 69 6e 64 |s consis|t of ind|
|00003790| 65 78 65 73 20 74 6f 20 | 74 68 65 20 62 65 73 74 |exes to |the best|
|000037a0| 20 63 6f 6c 6f 72 73 20 | 69 6e 20 74 68 65 20 43 | colors |in the C|
|000037b0| 4c 55 54 20 66 6f 72 20 | 74 68 61 74 20 52 47 42 |LUT for |that RGB|
|000037c0| 20 76 61 6c 75 65 2e 0d | 0d 46 69 67 75 72 65 20 | value..|.Figure |
|000037d0| 31 2d 31 09 53 61 6d 70 | 6c 65 20 69 6e 76 65 72 |1-1.Samp|le inver|
|000037e0| 73 65 20 74 61 62 6c 65 | 0d 0d 49 6e 20 43 6f 6c |se table|..In Col|
|000037f0| 6f 72 20 51 75 69 63 6b | 44 72 61 77 d5 73 20 77 |or Quick|Draw.s w|
|00003800| 6f 72 6c 64 2c 20 69 6e | 76 65 72 73 65 20 74 61 |orld, in|verse ta|
|00003810| 62 6c 65 73 20 6d 61 79 | 20 75 73 65 20 33 2c 20 |bles may| use 3, |
|00003820| 34 2c 20 6f 72 20 35 20 | 62 69 74 73 20 66 6f 72 |4, or 5 |bits for|
|00003830| 20 65 61 63 68 20 63 6f | 6c 6f 72 20 63 6f 6d 70 | each co|lor comp|
|00003840| 6f 6e 65 6e 74 2e 20 54 | 68 65 20 6e 75 6d 62 65 |onent. T|he numbe|
|00003850| 72 20 6f 66 20 62 69 74 | 73 20 75 73 65 64 20 69 |r of bit|s used i|
|00003860| 73 20 63 61 6c 6c 65 64 | 20 74 68 65 20 72 65 73 |s called| the res|
|00003870| 6f 6c 75 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 69 |olution |of the i|
|00003880| 6e 76 65 72 73 65 20 74 | 61 62 6c 65 2e 20 54 68 |nverse t|able. Th|
|00003890| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 74 61 |e size o|f the ta|
|000038a0| 62 6c 65 20 64 65 70 65 | 6e 64 73 20 6f 6e 20 69 |ble depe|nds on i|
|000038b0| 74 73 20 72 65 73 6f 6c | 75 74 69 6f 6e 3b 20 74 |ts resol|ution; t|
|000038c0| 68 65 20 74 61 62 6c 65 | 20 6d 75 73 74 20 62 65 |he table| must be|
|000038d0| 20 6c 61 72 67 65 20 65 | 6e 6f 75 67 68 20 74 6f | large e|nough to|
|000038e0| 20 61 63 63 6f 6d 6d 6f | 64 61 74 65 20 65 76 65 | accommo|date eve|
|000038f0| 72 79 20 63 6f 6c 6f 72 | 20 63 6f 6d 62 69 6e 61 |ry color| combina|
|00003900| 74 69 6f 6e 20 61 74 20 | 61 20 67 69 76 65 6e 20 |tion at |a given |
|00003910| 72 65 73 6f 6c 75 74 69 | 6f 6e 2e 20 46 6f 72 20 |resoluti|on. For |
|00003920| 65 78 61 6d 70 6c 65 2c | 20 74 68 65 20 6e 75 6d |example,| the num|
|00003930| 62 65 72 20 6f 66 20 63 | 6f 6d 62 69 6e 61 74 69 |ber of c|ombinati|
|00003940| 6f 6e 73 20 69 6e 20 61 | 20 74 61 62 6c 65 20 6f |ons in a| table o|
|00003950| 66 20 72 65 73 6f 6c 75 | 74 69 6f 6e 20 33 20 69 |f resolu|tion 3 i|
|00003960| 73 20 35 31 32 2c 20 73 | 6f 20 61 6e 20 69 6e 76 |s 512, s|o an inv|
|00003970| 65 72 73 65 20 74 61 62 | 6c 65 20 6f 66 20 72 65 |erse tab|le of re|
|00003980| 73 6f 6c 75 74 69 6f 6e | 20 33 20 68 61 73 20 35 |solution| 3 has 5|
|00003990| 31 32 20 65 6e 74 72 69 | 65 73 2c 20 6f 66 20 6f |12 entri|es, of o|
|000039a0| 6e 65 20 62 79 74 65 20 | 65 61 63 68 2e 20 28 48 |ne byte |each. (H|
|000039b0| 65 72 65 d5 73 20 68 6f | 77 20 74 6f 20 63 61 6c |ere.s ho|w to cal|
|000039c0| 63 75 6c 61 74 65 20 74 | 68 65 20 35 31 32 3a 20 |culate t|he 512: |
|000039d0| 74 68 65 72 65 20 61 72 | 65 20 33 20 62 69 74 73 |there ar|e 3 bits|
|000039e0| 20 65 61 63 68 20 66 6f | 72 20 72 65 64 2c 20 67 | each fo|r red, g|
|000039f0| 72 65 65 6e 2c 20 61 6e | 64 20 62 6c 75 65 2c 20 |reen, an|d blue, |
|00003a00| 74 6f 74 61 6c 69 6e 67 | 20 39 20 62 69 74 73 2c |totaling| 9 bits,|
|00003a10| 20 74 68 65 20 70 65 72 | 6d 75 74 61 74 69 6f 6e | the per|mutation|
|00003a20| 73 20 6f 66 20 77 68 69 | 63 68 20 61 72 65 20 32 |s of whi|ch are 2|
|00003a30| 39 20 6f 72 20 35 31 32 | 2e 29 20 54 61 62 6c 65 |9 or 512|.) Table|
|00003a40| 73 20 6f 66 20 72 65 73 | 6f 6c 75 74 69 6f 6e 20 |s of res|olution |
|00003a50| 34 20 61 6e 64 20 35 20 | 6f 63 63 75 70 79 20 61 |4 and 5 |occupy a|
|00003a60| 70 70 72 6f 78 69 6d 61 | 74 65 6c 79 20 34 20 4b |pproxima|tely 4 K|
|00003a70| 42 20 61 6e 64 20 33 32 | 20 4b 42 2c 20 72 65 73 |B and 32| KB, res|
|00003a80| 70 65 63 74 69 76 65 6c | 79 2e 20 0d 54 68 65 20 |pectivel|y. .The |
|00003a90| 66 6f 72 6d 61 74 20 6f | 66 20 61 6e 20 69 6e 76 |format o|f an inv|
|00003aa0| 65 72 73 65 20 74 61 62 | 6c 65 20 66 6f 6c 6c 6f |erse tab|le follo|
|00003ab0| 77 73 2e 0d 54 59 50 45 | 0d 09 49 54 61 62 09 09 |ws..TYPE|..ITab..|
|00003ac0| 3d 09 52 45 43 4f 52 44 | 0d 09 09 69 54 61 62 53 |=.RECORD|...iTabS|
|00003ad0| 65 65 64 3a 09 09 09 09 | 4c 6f 6e 67 49 6e 74 3b |eed:....|LongInt;|
|00003ae0| 20 7b 63 6f 70 79 20 6f | 66 20 63 6f 6c 6f 72 20 | {copy o|f color |
|00003af0| 74 61 62 6c 65 20 73 65 | 65 64 7d 0d 09 09 69 54 |table se|ed}...iT|
|00003b00| 61 62 52 65 73 3a 09 09 | 09 09 49 6e 74 65 67 65 |abRes:..|..Intege|
|00003b10| 72 3b 20 7b 72 65 73 6f | 6c 75 74 69 6f 6e 20 6f |r; {reso|lution o|
|00003b20| 66 20 74 61 62 6c 65 3a | 20 33 2c 20 34 2c 20 6f |f table:| 3, 4, o|
|00003b30| 72 20 35 7d 0d 09 09 69 | 54 61 62 54 61 62 6c 65 |r 5}...i|TabTable|
|00003b40| 3a 09 09 09 09 41 52 52 | 41 59 5b 30 2e 2e 30 5d |:....ARR|AY[0..0]|
|00003b50| 20 4f 46 20 53 69 67 6e | 65 64 42 79 74 65 3b 20 | OF Sign|edByte; |
|00003b60| 7b 62 79 74 65 2d 6c 65 | 6e 67 74 68 20 63 6f 6c |{byte-le|ngth col|
|00003b70| 6f 72 20 7d 20 09 0d 09 | 09 09 09 09 09 09 09 09 |or } ...|........|
|00003b80| 7b 20 74 61 62 6c 65 20 | 69 6e 64 65 78 20 76 61 |{ table |index va|
|00003b90| 6c 75 65 73 7d 0d 09 45 | 4e 44 3b 0d 73 57 41 52 |lues}..E|ND;.sWAR|
|00003ba0| 4e 49 4e 47 0d 42 65 63 | 61 75 73 65 20 74 68 65 |NING.Bec|ause the|
|00003bb0| 20 66 6f 72 6d 61 74 20 | 6f 66 20 69 6e 76 65 72 | format |of inver|
|00003bc0| 73 65 20 74 61 62 6c 65 | 73 20 69 73 20 73 75 62 |se table|s is sub|
|00003bd0| 6a 65 63 74 20 74 6f 20 | 63 68 61 6e 67 65 20 69 |ject to |change i|
|00003be0| 6e 20 74 68 65 20 66 75 | 74 75 72 65 2c 20 6f 72 |n the fu|ture, or|
|00003bf0| 20 6d 61 79 20 6e 6f 74 | 20 62 65 20 70 72 65 73 | may not| be pres|
|00003c00| 65 6e 74 20 6f 6e 20 63 | 65 72 74 61 69 6e 20 64 |ent on c|ertain d|
|00003c10| 65 76 69 63 65 73 2c 20 | 61 70 70 6c 69 63 61 74 |evices, |applicat|
|00003c20| 69 6f 6e 73 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 |ions sho|uld not |
|00003c30| 61 73 73 75 6d 65 20 74 | 68 65 20 73 74 72 75 63 |assume t|he struc|
|00003c40| 74 75 72 65 20 6f 66 20 | 74 68 65 20 69 6e 76 65 |ture of |the inve|
|00003c50| 72 73 65 20 74 61 62 6c | 65 d5 73 20 64 61 74 61 |rse tabl|e.s data|
|00003c60| 2e 20 13 73 0d 0d 54 68 | 65 20 66 69 72 73 74 20 |. .s..Th|e first |
|00003c70| 65 6e 74 72 79 20 6f 66 | 20 74 68 65 20 69 54 61 |entry of| the iTa|
|00003c80| 62 54 61 62 6c 65 20 61 | 72 72 61 79 2c 20 61 74 |bTable a|rray, at|
|00003c90| 20 6c 6f 63 61 74 69 6f | 6e 20 30 20 28 72 65 64 | locatio|n 0 (red|
|00003ca0| 2c 20 67 72 65 65 6e 2c | 20 61 6e 64 20 62 6c 75 |, green,| and blu|
|00003cb0| 65 20 76 61 6c 75 65 73 | 20 6f 66 20 30 30 30 30 |e values| of 0000|
|00003cc0| 2c 20 30 30 30 30 2c 20 | 30 30 30 30 20 69 6e 20 |, 0000, |0000 in |
|00003cd0| 61 20 74 61 62 6c 65 20 | 6f 66 20 72 65 73 6f 6c |a table |of resol|
|00003ce0| 75 74 69 6f 6e 20 34 29 | 20 63 6f 6e 74 61 69 6e |ution 4)| contain|
|00003cf0| 73 20 74 68 65 20 69 6e | 64 65 78 20 74 6f 20 62 |s the in|dex to b|
|00003d00| 6c 61 63 6b 20 6f 72 20 | 74 68 65 20 6e 65 61 72 |lack or |the near|
|00003d10| 65 73 74 20 63 6f 6c 6f | 72 20 74 6f 20 69 74 20 |est colo|r to it |
|00003d20| 69 6e 20 74 68 65 20 43 | 4c 55 54 2e 20 53 69 6d |in the C|LUT. Sim|
|00003d30| 69 6c 61 72 6c 79 2c 20 | 74 68 65 20 6c 61 73 74 |ilarly, |the last|
|00003d40| 20 65 6e 74 72 79 20 69 | 6e 20 61 20 74 61 62 6c | entry i|n a tabl|
|00003d50| 65 20 6f 66 20 72 65 73 | 6f 6c 75 74 69 6f 6e 20 |e of res|olution |
|00003d60| 34 2c 20 61 74 20 6c 6f | 63 61 74 69 6f 6e 20 34 |4, at lo|cation 4|
|00003d70| 30 39 35 20 28 31 31 31 | 31 2c 20 31 31 31 31 2c |095 (111|1, 1111,|
|00003d80| 20 31 31 31 31 29 2c 20 | 63 6f 6e 74 61 69 6e 73 | 1111), |contains|
|00003d90| 20 74 68 65 20 43 4c 55 | 54 20 69 6e 64 65 78 20 | the CLU|T index |
|00003da0| 74 6f 20 77 68 69 74 65 | 2e 20 0d 53 69 6e 63 65 |to white|. .Since|
|00003db0| 20 74 68 65 20 6c 61 72 | 67 65 73 74 20 43 4c 55 | the lar|gest CLU|
|00003dc0| 54 20 68 61 73 20 6f 6e | 6c 79 20 32 35 36 20 65 |T has on|ly 256 e|
|00003dd0| 6e 74 72 69 65 73 2c 20 | 6d 61 6e 79 20 69 6e 76 |ntries, |many inv|
|00003de0| 65 72 73 65 20 74 61 62 | 6c 65 20 65 6e 74 72 69 |erse tab|le entri|
|00003df0| 65 73 20 63 6f 6e 74 61 | 69 6e 20 64 75 70 6c 69 |es conta|in dupli|
|00003e00| 63 61 74 65 73 20 6f 66 | 20 6f 74 68 65 72 20 65 |cates of| other e|
|00003e10| 6e 74 72 69 65 73 2e 20 | 46 6f 72 20 65 78 61 6d |ntries. |For exam|
|00003e20| 70 6c 65 2c 20 69 6e 20 | 61 6e 20 69 6e 76 65 72 |ple, in |an inver|
|00003e30| 73 65 20 74 61 62 6c 65 | 20 6f 66 20 72 65 73 6f |se table| of reso|
|00003e40| 6c 75 74 69 6f 6e 20 34 | 2c 20 74 68 65 20 66 69 |lution 4|, the fi|
|00003e50| 72 73 74 20 73 65 76 65 | 72 61 6c 20 65 6e 74 72 |rst seve|ral entr|
|00003e60| 69 65 73 20 6d 61 79 20 | 61 6c 6c 20 70 6f 69 6e |ies may |all poin|
|00003e70| 74 20 74 6f 20 74 68 65 | 20 69 6e 64 65 78 20 66 |t to the| index f|
|00003e80| 6f 72 20 62 6c 61 63 6b | 2c 20 74 68 65 20 6c 61 |or black|, the la|
|00003e90| 73 74 20 66 65 77 20 65 | 6e 74 72 69 65 73 20 6d |st few e|ntries m|
|00003ea0| 61 79 20 61 6c 6c 20 70 | 6f 69 6e 74 20 74 6f 20 |ay all p|oint to |
|00003eb0| 74 68 65 20 69 6e 64 65 | 78 20 66 6f 72 20 77 68 |the inde|x for wh|
|00003ec0| 69 74 65 2c 20 61 6e 64 | 20 65 76 65 6e 20 76 61 |ite, and| even va|
|00003ed0| 72 69 6f 75 73 20 65 6e | 74 72 69 65 73 20 69 6e |rious en|tries in|
|00003ee0| 20 74 68 65 20 6d 69 64 | 64 6c 65 20 6d 61 79 20 | the mid|dle may |
|00003ef0| 70 6f 69 6e 74 20 74 6f | 20 77 68 69 74 65 20 6f |point to| white o|
|00003f00| 72 20 62 6c 61 63 6b 2c | 20 61 73 20 69 6c 6c 75 |r black,| as illu|
|00003f10| 73 74 72 61 74 65 64 20 | 69 6e 20 46 69 67 75 72 |strated |in Figur|
|00003f20| 65 20 31 2d 32 2e 0d 0d | 46 69 67 75 72 65 20 31 |e 1-2...|Figure 1|
|00003f30| 2d 32 09 0d 41 6e 20 69 | 6e 76 65 72 73 65 20 74 |-2..An i|nverse t|
|00003f40| 61 62 6c 65 20 6f 66 20 | 72 65 73 6f 6c 75 74 69 |able of |resoluti|
|00003f50| 6f 6e 20 34 0d 0d 4e 6f | 74 65 0d 46 69 6e 64 69 |on 4..No|te.Findi|
|00003f60| 6e 67 20 69 6e 64 65 78 | 65 73 20 62 79 20 6d 65 |ng index|es by me|
|00003f70| 61 6e 73 20 6f 66 20 69 | 6e 76 65 72 73 65 20 74 |ans of i|nverse t|
|00003f80| 61 62 6c 65 73 20 69 73 | 20 74 68 65 20 43 6f 6c |ables is| the Col|
|00003f90| 6f 72 20 4d 61 6e 61 67 | 65 72 d5 73 20 64 65 66 |or Manag|er.s def|
|00003fa0| 61 75 6c 74 20 6d 65 74 | 68 6f 64 20 66 6f 72 20 |ault met|hod for |
|00003fb0| 63 6f 6c 6f 72 20 6d 61 | 70 70 69 6e 67 2e 20 49 |color ma|pping. I|
|00003fc0| 6e 20 73 6f 6d 65 20 63 | 61 73 65 73 2c 20 79 6f |n some c|ases, yo|
|00003fd0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6d |ur appli|cation m|
|00003fe0| 61 79 20 6e 65 65 64 20 | 74 6f 20 6f 76 65 72 72 |ay need |to overr|
|00003ff0| 69 64 65 20 74 68 65 20 | 63 6f 64 65 20 66 6f 72 |ide the |code for|
|00004000| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 20 6d | inverse| table m|
|00004010| 61 70 70 69 6e 67 20 77 | 69 74 68 20 63 75 73 74 |apping w|ith cust|
|00004020| 6f 6d 20 72 6f 75 74 69 | 6e 65 73 20 74 68 61 74 |om routi|nes that|
|00004030| 20 68 61 76 65 20 73 70 | 65 63 69 61 6c 20 6d 61 | have sp|ecial ma|
|00004040| 70 70 69 6e 67 20 72 75 | 6c 65 73 2e 20 53 65 65 |pping ru|les. See|
|00004050| 20 d2 43 75 73 74 6f 6d | 20 53 65 61 72 63 68 20 | .Custom| Search |
|00004060| 61 6e 64 20 43 6f 6d 70 | 6c 65 6d 65 6e 74 20 50 |and Comp|lement P|
|00004070| 72 6f 63 65 64 75 72 65 | 73 d3 20 6f 6e 20 78 78 |rocedure|s. on xx|
|00004080| 78 20 66 6f 72 20 6d 6f | 72 65 20 64 65 74 61 69 |x for mo|re detai|
|00004090| 6c 73 2e 13 75 0d 0d 0d | 49 6e 76 65 72 73 65 20 |ls..u...|Inverse |
|000040a0| 54 61 62 6c 65 73 20 69 | 6e 20 41 63 74 69 6f 6e |Tables i|n Action|
|000040b0| 0d 0d 57 68 65 6e 20 43 | 6f 6c 6f 72 20 51 75 69 |..When C|olor Qui|
|000040c0| 63 6b 44 72 61 77 20 73 | 75 70 70 6c 69 65 73 20 |ckDraw s|upplies |
|000040d0| 61 6e 20 52 47 42 20 63 | 6f 6c 6f 72 2c 20 74 68 |an RGB c|olor, th|
|000040e0| 65 20 43 6f 6c 6f 72 20 | 4d 61 6e 61 67 65 72 20 |e Color |Manager |
|000040f0| 74 72 75 6e 63 61 74 65 | 73 20 74 68 65 20 72 65 |truncate|s the re|
|00004100| 64 2c 20 67 72 65 65 6e | 2c 20 61 6e 64 20 62 6c |d, green|, and bl|
|00004110| 75 65 20 76 61 6c 75 65 | 73 20 74 6f 20 74 68 65 |ue value|s to the|
|00004120| 20 73 69 7a 65 20 6f 66 | 20 74 68 65 20 74 61 62 | size of| the tab|
|00004130| 6c 65 20 72 65 73 6f 6c | 75 74 69 6f 6e 2c 20 61 |le resol|ution, a|
|00004140| 6e 64 20 63 6f 6e 63 61 | 74 65 6e 61 74 65 73 20 |nd conca|tenates |
|00004150| 74 68 65 20 72 65 73 75 | 6c 74 73 20 74 6f 20 66 |the resu|lts to f|
|00004160| 6f 72 6d 20 61 6e 20 69 | 6e 64 65 78 20 69 6e 74 |orm an i|ndex int|
|00004170| 6f 20 74 68 65 20 74 61 | 62 6c 65 2e 20 41 74 20 |o the ta|ble. At |
|00004180| 74 68 61 74 20 6c 6f 63 | 61 74 69 6f 6e 2c 20 74 |that loc|ation, t|
|00004190| 68 65 20 43 6f 6c 6f 72 | 20 4d 61 6e 61 67 65 72 |he Color| Manager|
|000041a0| 2c 20 77 68 65 6e 20 69 | 74 20 62 75 69 6c 74 20 |, when i|t built |
|000041b0| 74 68 65 20 69 6e 76 65 | 72 73 65 20 74 61 62 6c |the inve|rse tabl|
|000041c0| 65 2c 20 73 74 6f 72 65 | 64 20 74 68 65 20 69 6e |e, store|d the in|
|000041d0| 64 65 78 20 74 6f 20 74 | 68 65 20 62 65 73 74 2d |dex to t|he best-|
|000041e0| 6d 61 70 70 69 6e 67 20 | 63 6f 6c 6f 72 20 69 6e |mapping |color in|
|000041f0| 20 74 68 65 20 43 4c 55 | 54 2e 20 0d 54 61 62 6c | the CLU|T. .Tabl|
|00004200| 65 20 31 2d 31 20 73 68 | 6f 77 73 20 74 77 6f 20 |e 1-1 sh|ows two |
|00004210| 69 6e 64 65 78 65 73 20 | 69 6e 74 6f 20 74 77 6f |indexes |into two|
|00004220| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 73 2c | inverse| tables,|
|00004230| 20 6f 6e 65 20 6f 66 20 | 72 65 73 6f 6c 75 74 69 | one of |resoluti|
|00004240| 6f 6e 20 34 2c 20 74 68 | 65 20 6f 74 68 65 72 20 |on 4, th|e other |
|00004250| 6f 66 20 72 65 73 6f 6c | 75 74 69 6f 6e 20 35 2c |of resol|ution 5,|
|00004260| 20 77 68 65 6e 20 74 68 | 65 20 43 6f 6c 6f 72 54 | when th|e ColorT|
|00004270| 6f 49 6e 64 65 78 20 72 | 6f 75 74 69 6e 65 20 69 |oIndex r|outine i|
|00004280| 73 20 67 69 76 65 6e 20 | 61 6e 20 52 47 42 20 63 |s given |an RGB c|
|00004290| 6f 6c 6f 72 20 6f 66 20 | 24 31 32 33 34 35 36 37 |olor of |$1234567|
|000042a0| 38 39 41 42 43 3a 09 0d | 54 61 62 6c 65 20 31 2d |89ABC:..|Table 1-|
|000042b0| 31 09 53 61 6d 70 6c 65 | 20 69 6e 76 65 72 73 65 |1.Sample| inverse|
|000042c0| 20 74 61 62 6c 65 20 69 | 6e 64 65 78 65 73 0d 54 | table i|ndexes.T|
|000042d0| 61 62 6c 65 20 72 65 73 | 6f 6c 75 74 69 6f 6e 09 |able res|olution.|
|000042e0| 47 69 76 65 6e 20 52 47 | 42 43 6f 6c 6f 72 20 72 |Given RG|BColor r|
|000042f0| 65 63 6f 72 64 09 49 6e | 76 65 72 73 65 20 74 61 |ecord.In|verse ta|
|00004300| 62 6c 65 20 69 6e 64 65 | 78 09 54 61 62 6c 65 20 |ble inde|x.Table |
|00004310| 73 69 7a 65 09 0d 0d 34 | 2d 62 69 74 09 72 65 64 |size...4|-bit.red|
|00004320| 3d 24 31 32 33 34 2c 20 | 67 72 65 65 6e 3d 24 35 |=$1234, |green=$5|
|00004330| 36 37 38 2c 62 6c 75 65 | 3d 24 39 41 42 43 09 24 |678,blue|=$9ABC.$|
|00004340| 30 31 35 39 09 32 31 32 | 20 3d 20 34 20 4b 42 09 |0159.212| = 4 KB.|
|00004350| 0d 35 2d 62 69 74 09 72 | 65 64 3d 24 31 32 33 34 |.5-bit.r|ed=$1234|
|00004360| 2c 20 67 72 65 65 6e 3d | 24 35 36 37 38 2c 62 6c |, green=|$5678,bl|
|00004370| 75 65 3d 24 39 41 42 43 | 09 24 30 39 35 33 09 32 |ue=$9ABC|.$0953.2|
|00004380| 31 35 20 3d 20 33 32 20 | 4b 42 09 0d 0d 54 68 65 |15 = 32 |KB...The|
|00004390| 20 43 6f 6c 6f 72 20 4d | 61 6e 61 67 65 72 20 64 | Color M|anager d|
|000043a0| 65 72 69 76 65 64 20 74 | 68 65 20 34 2d 62 69 74 |erived t|he 4-bit|
|000043b0| 20 69 6e 64 65 78 20 62 | 79 20 74 61 6b 69 6e 67 | index b|y taking|
|000043c0| 20 74 68 65 20 74 6f 70 | 20 34 20 62 69 74 73 20 | the top| 4 bits |
|000043d0| 6f 66 20 65 61 63 68 20 | 63 6f 6c 6f 72 20 63 6f |of each |color co|
|000043e0| 6d 70 6f 6e 65 6e 74 2e | 20 54 68 65 20 35 2d 62 |mponent.| The 5-b|
|000043f0| 69 74 20 69 6e 64 65 78 | 20 69 73 20 6d 6f 72 65 |it index| is more|
|00004400| 20 73 75 62 74 6c 65 2e | 20 46 69 67 75 72 65 20 | subtle.| Figure |
|00004410| 31 2d 33 20 69 6c 6c 75 | 73 74 72 61 74 65 73 20 |1-3 illu|strates |
|00004420| 74 68 65 20 73 74 65 70 | 73 20 6f 66 20 74 72 75 |the step|s of tru|
|00004430| 6e 63 61 74 69 6f 6e 20 | 61 6e 64 20 63 6f 6e 63 |ncation |and conc|
|00004440| 61 74 65 6e 61 74 69 6f | 6e 20 74 68 61 74 20 72 |atenatio|n that r|
|00004450| 65 73 75 6c 74 20 69 6e | 20 74 68 65 20 76 61 6c |esult in| the val|
|00004460| 75 65 20 24 30 39 35 33 | 2e 0d 0d 46 69 67 75 72 |ue $0953|...Figur|
|00004470| 65 20 31 2d 33 09 43 72 | 65 61 74 69 6e 67 20 61 |e 1-3.Cr|eating a|
|00004480| 6e 20 69 6e 76 65 72 73 | 65 20 74 61 62 6c 65 20 |n invers|e table |
|00004490| 69 6e 64 65 78 0d 0d 54 | 68 65 20 43 6f 6c 6f 72 |index..T|he Color|
|000044a0| 20 4d 61 6e 61 67 65 72 | 20 74 72 75 6e 63 61 74 | Manager| truncat|
|000044b0| 65 73 20 74 68 65 20 68 | 69 67 68 2d 6f 72 64 65 |es the h|igh-orde|
|000044c0| 72 20 38 20 62 69 74 73 | 20 6f 66 20 65 61 63 68 |r 8 bits| of each|
|000044d0| 20 63 6f 6c 6f 72 20 63 | 6f 6d 70 6f 6e 65 6e 74 | color c|omponent|
|000044e0| 20 74 6f 20 74 68 65 20 | 68 69 67 68 2d 6f 72 64 | to the |high-ord|
|000044f0| 65 72 20 35 20 62 69 74 | 73 2c 20 61 6e 64 20 74 |er 5 bit|s, and t|
|00004500| 68 65 6e 20 63 6f 6e 63 | 61 74 65 6e 61 74 65 73 |hen conc|atenates|
|00004510| 20 74 68 6f 73 65 20 31 | 35 20 62 69 74 73 2e 20 | those 1|5 bits. |
|00004520| 54 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 76 61 |The resu|lting va|
|00004530| 6c 75 65 2c 20 24 30 39 | 35 33 20 69 6e 20 68 65 |lue, $09|53 in he|
|00004540| 78 61 64 65 63 69 6d 61 | 6c 2c 20 69 73 20 74 68 |xadecima|l, is th|
|00004550| 65 20 69 6e 64 65 78 20 | 69 6e 74 6f 20 74 68 65 |e index |into the|
|00004560| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 2e 0d | inverse| table..|
|00004570| 0d 0d 48 69 64 64 65 6e | 20 43 6f 6c 6f 72 73 0d |..Hidden| Colors.|
|00004580| 0d 43 6f 6c 6f 72 73 20 | 74 68 61 74 20 61 72 65 |.Colors |that are|
|00004590| 20 63 6c 6f 73 65 20 69 | 6e 20 52 47 42 20 73 70 | close i|n RGB sp|
|000045a0| 61 63 65 20 63 61 6e 20 | 62 65 63 6f 6d 65 20 68 |ace can |become h|
|000045b0| 69 64 64 65 6e 20 77 68 | 65 6e 20 74 68 65 79 20 |idden wh|en they |
|000045c0| 64 69 66 66 65 72 20 6f | 6e 6c 79 20 69 6e 20 6c |differ o|nly in l|
|000045d0| 6f 77 2d 6f 72 64 65 72 | 20 62 69 74 73 20 74 68 |ow-order| bits th|
|000045e0| 61 74 20 77 65 72 65 6e | d5 74 20 75 73 65 64 20 |at weren|.t used |
|000045f0| 74 6f 20 63 6f 6e 73 74 | 72 75 63 74 20 74 68 65 |to const|ruct the|
|00004600| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 20 69 | inverse| table i|
|00004610| 6e 64 65 78 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |ndex. Fo|r exampl|
|00004620| 65 2c 20 65 76 65 6e 20 | 69 66 20 74 68 65 20 43 |e, even |if the C|
|00004630| 4c 55 54 20 77 65 72 65 | 20 6c 6f 61 64 65 64 20 |LUT were| loaded |
|00004640| 77 69 74 68 20 32 35 36 | 20 6c 65 76 65 6c 73 20 |with 256| levels |
|00004650| 6f 66 20 67 72 61 79 2c | 20 61 20 34 2d 62 69 74 |of gray,| a 4-bit|
|00004660| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 20 63 | inverse| table c|
|00004670| 61 6e 20 6f 6e 6c 79 20 | 64 69 73 63 72 69 6d 69 |an only |discrimi|
|00004680| 6e 61 74 65 20 61 6d 6f | 6e 67 20 31 36 20 6f 66 |nate amo|ng 16 of|
|00004690| 20 74 68 65 20 6c 65 76 | 65 6c 73 2e 20 28 49 6e | the lev|els. (In|
|000046a0| 20 74 68 65 20 34 30 39 | 36 20 70 65 72 6d 75 74 | the 409|6 permut|
|000046b0| 61 74 69 6f 6e 73 20 74 | 68 65 72 65 20 61 72 65 |ations t|here are|
|000046c0| 20 6f 6e 6c 79 20 31 36 | 20 70 6c 61 63 65 73 20 | only 16| places |
|000046d0| 77 68 65 72 65 20 74 68 | 65 20 72 65 64 2c 20 67 |where th|e red, g|
|000046e0| 72 65 65 6e 2c 20 61 6e | 64 20 62 6c 75 65 20 76 |reen, an|d blue v|
|000046f0| 61 6c 75 65 73 20 61 72 | 65 20 65 71 75 61 6c 2e |alues ar|e equal.|
|00004700| 29 20 0d 54 6f 20 73 6f | 6c 76 65 20 74 68 69 73 |) .To so|lve this|
|00004710| 20 70 72 6f 62 6c 65 6d | 2c 20 69 6e 76 65 72 73 | problem|, invers|
|00004720| 65 20 74 61 62 6c 65 73 | 20 63 61 72 72 79 20 61 |e tables| carry a|
|00004730| 64 64 69 74 69 6f 6e 61 | 6c 20 69 6e 66 6f 72 6d |dditiona|l inform|
|00004740| 61 74 69 6f 6e 20 61 62 | 6f 75 74 20 68 6f 77 20 |ation ab|out how |
|00004750| 74 6f 20 66 69 6e 64 20 | 63 6f 6c 6f 72 73 20 74 |to find |colors t|
|00004760| 68 61 74 20 64 69 66 66 | 65 72 20 6f 6e 6c 79 20 |hat diff|er only |
|00004770| 69 6e 20 74 68 65 20 6c | 65 73 73 20 73 69 67 6e |in the l|ess sign|
|00004780| 69 66 69 63 61 6e 74 20 | 62 69 74 73 2e 20 28 54 |ificant |bits. (T|
|00004790| 68 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 69 |he infor|mation i|
|000047a0| 73 20 6b 65 70 74 20 70 | 72 69 76 61 74 65 20 74 |s kept p|rivate t|
|000047b0| 6f 20 74 68 65 20 43 6f | 6c 6f 72 20 4d 61 6e 61 |o the Co|lor Mana|
|000047c0| 67 65 72 2e 29 20 41 73 | 20 61 20 72 65 73 75 6c |ger.) As| a resul|
|000047d0| 74 2c 20 77 68 65 6e 20 | 74 68 65 20 43 6f 6c 6f |t, when |the Colo|
|000047e0| 72 54 6f 49 6e 64 65 78 | 20 66 75 6e 63 74 69 6f |rToIndex| functio|
|000047f0| 6e 20 69 73 20 63 61 6c | 6c 65 64 2c 20 69 74 20 |n is cal|led, it |
|00004800| 63 61 6e 20 66 69 6e 64 | 20 74 68 65 20 62 65 73 |can find| the bes|
|00004810| 74 20 63 6f 6c 6f 72 20 | 74 6f 20 74 68 65 20 66 |t color |to the f|
|00004820| 75 6c 6c 20 34 38 2d 62 | 69 74 20 72 65 73 6f 6c |ull 48-b|it resol|
|00004830| 75 74 69 6f 6e 20 61 76 | 61 69 6c 61 62 6c 65 20 |ution av|ailable |
|00004840| 69 6e 20 61 20 43 6f 6c | 6f 72 53 70 65 63 20 72 |in a Col|orSpec r|
|00004850| 65 63 6f 72 64 2e 20 53 | 69 6e 63 65 20 65 78 61 |ecord. S|ince exa|
|00004860| 6d 69 6e 69 6e 67 20 74 | 68 65 20 65 78 74 72 61 |mining t|he extra|
|00004870| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 74 61 6b | informa|tion tak|
|00004880| 65 73 20 74 69 6d 65 2c | 20 63 65 72 74 61 69 6e |es time,| certain|
|00004890| 20 70 61 72 74 73 20 6f | 66 20 43 6f 6c 6f 72 20 | parts o|f Color |
|000048a0| 51 75 69 63 6b 44 72 61 | 77 2c 20 6e 6f 74 61 62 |QuickDra|w, notab|
|000048b0| 6c 79 20 74 68 65 20 61 | 72 69 74 68 6d 65 74 69 |ly the a|rithmeti|
|000048c0| 63 20 74 72 61 6e 73 66 | 65 72 20 6d 6f 64 65 73 |c transf|er modes|
|000048d0| 2c 20 64 6f 6e d5 74 20 | 75 73 65 20 74 68 69 73 |, don.t |use this|
|000048e0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 6e 64 | informa|tion and|
|000048f0| 20 68 65 6e 63 65 20 77 | 6f 6e d5 74 20 66 69 6e | hence w|on.t fin|
|00004900| 64 20 74 68 65 20 68 69 | 64 64 65 6e 20 63 6f 6c |d the hi|dden col|
|00004910| 6f 72 73 2e 0d 0d 42 75 | 69 6c 64 69 6e 67 20 49 |ors...Bu|ilding I|
|00004920| 6e 76 65 72 73 65 20 54 | 61 62 6c 65 73 0d 0d 54 |nverse T|ables..T|
|00004930| 68 65 20 43 6f 6c 6f 72 | 20 4d 61 6e 61 67 65 72 |he Color| Manager|
|00004940| 20 62 75 69 6c 64 73 20 | 61 6e 20 69 6e 76 65 72 | builds |an inver|
|00004950| 73 65 20 74 61 62 6c 65 | 20 66 6f 72 20 65 61 63 |se table| for eac|
|00004960| 68 20 67 72 61 70 68 69 | 63 73 20 64 65 76 69 63 |h graphi|cs devic|
|00004970| 65 20 61 74 20 73 74 61 | 72 74 75 70 2e 20 54 68 |e at sta|rtup. Th|
|00004980| 65 20 64 61 74 61 20 69 | 6e 20 69 6e 76 65 72 73 |e data i|n invers|
|00004990| 65 20 74 61 62 6c 65 73 | 20 72 65 6d 61 69 6e 73 |e tables| remains|
|000049a0| 20 76 61 6c 69 64 20 61 | 73 20 6c 6f 6e 67 20 61 | valid a|s long a|
|000049b0| 73 20 74 68 65 20 43 4c | 55 54 20 66 72 6f 6d 20 |s the CL|UT from |
|000049c0| 77 68 69 63 68 20 69 74 | 20 77 61 73 20 62 75 69 |which it| was bui|
|000049d0| 6c 74 20 72 65 6d 61 69 | 6e 73 20 75 6e 63 68 61 |lt remai|ns uncha|
|000049e0| 6e 67 65 64 2e 20 0d 54 | 68 65 20 43 6f 6c 6f 72 |nged. .T|he Color|
|000049f0| 20 4d 61 6e 61 67 65 72 | 20 72 65 62 75 69 6c 64 | Manager| rebuild|
|00004a00| 73 20 61 20 74 61 62 6c | 65 20 77 68 65 6e 65 76 |s a tabl|e whenev|
|00004a10| 65 72 20 43 6f 6c 6f 72 | 20 51 75 69 63 6b 44 72 |er Color| QuickDr|
|00004a20| 61 77 2c 20 74 68 65 20 | 43 6f 6c 6f 72 20 50 69 |aw, the |Color Pi|
|00004a30| 63 6b 65 72 2c 20 6f 72 | 20 74 68 65 20 50 61 6c |cker, or| the Pal|
|00004a40| 65 74 74 65 20 4d 61 6e | 61 67 65 72 20 72 65 71 |ette Man|ager req|
|00004a50| 75 65 73 74 73 20 63 6f | 6c 6f 72 73 20 66 72 6f |uests co|lors fro|
|00004a60| 6d 20 61 20 67 72 61 70 | 68 69 63 73 20 64 65 76 |m a grap|hics dev|
|00004a70| 69 63 65 20 77 68 6f 73 | 65 20 43 4c 55 54 20 68 |ice whos|e CLUT h|
|00004a80| 61 73 20 63 68 61 6e 67 | 65 64 2e 20 54 6f 20 64 |as chang|ed. To d|
|00004a90| 65 74 65 72 6d 69 6e 65 | 20 77 68 65 74 68 65 72 |etermine| whether|
|00004aa0| 20 61 6e 20 69 6e 76 65 | 72 73 65 20 74 61 62 6c | an inve|rse tabl|
|00004ab0| 65 20 68 61 73 20 62 65 | 65 6e 20 63 68 61 6e 67 |e has be|en chang|
|00004ac0| 65 64 2c 20 74 68 65 20 | 43 6f 6c 6f 72 20 4d 61 |ed, the |Color Ma|
|00004ad0| 6e 61 67 65 72 20 63 6f | 6d 70 61 72 65 73 20 74 |nager co|mpares t|
|00004ae0| 68 65 20 63 74 53 65 65 | 64 20 66 69 65 6c 64 20 |he ctSee|d field |
|00004af0| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 47 |of the c|urrent G|
|00004b00| 44 65 76 69 63 65 20 72 | 65 63 6f 72 64 d5 73 20 |Device r|ecord.s |
|00004b10| 63 6f 6c 6f 72 20 74 61 | 62 6c 65 20 61 67 61 69 |color ta|ble agai|
|00004b20| 6e 73 74 20 74 68 65 20 | 69 54 61 62 53 65 65 64 |nst the |iTabSeed|
|00004b30| 20 66 69 65 6c 64 20 6f | 66 20 74 68 61 74 20 67 | field o|f that g|
|00004b40| 72 61 70 68 69 63 73 20 | 64 65 76 69 63 65 d5 73 |raphics |device.s|
|00004b50| 20 69 6e 76 65 72 73 65 | 20 74 61 62 6c 65 2e 20 | inverse| table. |
|00004b60| 45 61 63 68 20 72 6f 75 | 74 69 6e 65 20 74 68 61 |Each rou|tine tha|
|00004b70| 74 20 6d 6f 64 69 66 69 | 65 73 20 74 68 65 20 43 |t modifi|es the C|
|00004b80| 6f 6c 6f 72 54 61 62 6c | 65 20 72 65 63 6f 72 64 |olorTabl|e record|
|00004b90| 20 28 77 69 74 68 20 74 | 68 65 20 65 78 63 65 70 | (with t|he excep|
|00004ba0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 52 65 73 74 |tion of |the Rest|
|00004bb0| 6f 72 65 45 6e 74 72 69 | 65 73 20 70 72 6f 63 65 |oreEntri|es proce|
|00004bc0| 64 75 72 65 29 20 69 6e | 63 72 65 6d 65 6e 74 73 |dure) in|crements|
|00004bd0| 20 74 68 65 20 76 61 6c | 75 65 20 69 6e 20 69 74 | the val|ue in it|
|00004be0| 73 20 63 74 53 65 65 64 | 20 66 69 65 6c 64 2e 20 |s ctSeed| field. |
|00004bf0| 49 66 20 63 74 53 65 65 | 64 20 61 6e 64 20 69 54 |If ctSee|d and iT|
|00004c00| 61 62 53 65 65 64 20 64 | 6f 6e d5 74 20 6d 61 74 |abSeed d|on.t mat|
|00004c10| 63 68 2c 20 74 68 65 20 | 43 6f 6c 6f 72 20 4d 61 |ch, the |Color Ma|
|00004c20| 6e 61 67 65 72 20 69 6e | 76 61 6c 69 64 61 74 65 |nager in|validate|
|00004c30| 73 20 74 68 65 20 69 6e | 76 65 72 73 65 20 74 61 |s the in|verse ta|
|00004c40| 62 6c 65 20 61 6e 64 20 | 72 65 62 75 69 6c 64 73 |ble and |rebuilds|
|00004c50| 20 69 74 2e 0d 4e 6f 74 | 65 0d 55 6e 64 65 72 20 | it..Not|e.Under |
|00004c60| 6e 6f 72 6d 61 6c 20 63 | 69 72 63 75 6d 73 74 61 |normal c|ircumsta|
|00004c70| 6e 63 65 73 2c 20 79 6f | 75 72 20 61 70 70 6c 69 |nces, yo|ur appli|
|00004c80| 63 61 74 69 6f 6e 20 64 | 6f 65 73 20 6e 6f 74 20 |cation d|oes not |
|00004c90| 6b 6e 6f 77 20 77 68 65 | 6e 20 74 68 65 20 43 6f |know whe|n the Co|
|00004ca0| 6c 6f 72 20 4d 61 6e 61 | 67 65 72 20 68 61 73 20 |lor Mana|ger has |
|00004cb0| 69 6e 76 61 6c 69 64 61 | 74 65 64 20 61 6e 20 69 |invalida|ted an i|
|00004cc0| 6e 76 65 72 73 65 20 74 | 61 62 6c 65 2e 20 54 68 |nverse t|able. Th|
|00004cd0| 65 20 6d 65 74 68 6f 64 | 20 6f 66 20 69 6e 76 61 |e method| of inva|
|00004ce0| 6c 69 64 61 74 69 6f 6e | 20 69 73 20 74 68 65 20 |lidation| is the |
|00004cf0| 73 61 6d 65 20 61 73 20 | 74 68 65 20 6f 6e 65 20 |same as |the one |
|00004d00| 74 68 61 74 20 43 6f 6c | 6f 72 20 51 75 69 63 6b |that Col|or Quick|
|00004d10| 44 72 61 77 20 75 73 65 | 73 20 74 6f 20 69 6e 76 |Draw use|s to inv|
|00004d20| 61 6c 69 64 61 74 65 20 | 65 78 70 61 6e 64 65 64 |alidate |expanded|
|00004d30| 20 70 61 74 74 65 72 6e | 73 20 61 6e 64 20 63 75 | pattern|s and cu|
|00004d40| 72 73 6f 72 73 2e 20 13 | 75 0d 0d 49 66 20 79 6f |rsors. .|u..If yo|
|00004d50| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6d |ur appli|cation m|
|00004d60| 6f 64 69 66 69 65 73 20 | 61 20 63 6f 6c 6f 72 20 |odifies |a color |
|00004d70| 74 61 62 6c 65 20 65 6e | 74 72 79 20 64 69 72 65 |table en|try dire|
|00004d80| 63 74 6c 79 20 28 77 68 | 69 63 68 20 69 73 20 6e |ctly (wh|ich is n|
|00004d90| 6f 74 20 72 65 63 6f 6d | 6d 65 6e 64 65 64 29 2c |ot recom|mended),|
|00004da0| 20 69 74 20 73 68 6f 75 | 6c 64 20 63 61 6c 6c 20 | it shou|ld call |
|00004db0| 74 68 65 20 75 74 69 6c | 69 74 79 20 72 6f 75 74 |the util|ity rout|
|00004dc0| 69 6e 65 20 43 54 61 62 | 43 68 61 6e 67 65 64 2c |ine CTab|Changed,|
|00004dd0| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00004de0| 65 20 63 68 61 70 74 65 | 72 20 d2 43 75 72 73 6f |e chapte|r .Curso|
|00004df0| 72 20 4d 61 6e 61 67 65 | 72 20 61 6e 64 20 4f 74 |r Manage|r and Ot|
|00004e00| 68 65 72 20 47 72 61 70 | 68 69 63 73 20 55 74 69 |her Grap|hics Uti|
|00004e10| 6c 69 74 69 65 73 2e d3 | 20 43 54 61 62 43 68 61 |lities..| CTabCha|
|00004e20| 6e 67 65 64 20 63 68 61 | 6e 67 65 73 20 74 68 65 |nged cha|nges the|
|00004e30| 20 69 54 61 62 53 65 65 | 64 20 76 61 6c 75 65 20 | iTabSee|d value |
|00004e40| 73 6f 20 74 68 61 74 20 | 74 68 65 20 43 6f 6c 6f |so that |the Colo|
|00004e50| 72 20 4d 61 6e 61 67 65 | 72 20 72 65 62 75 69 6c |r Manage|r rebuil|
|00004e60| 64 73 20 74 68 65 20 74 | 61 62 6c 65 20 74 68 65 |ds the t|able the|
|00004e70| 20 6e 65 78 74 20 74 69 | 6d 65 20 61 20 70 69 78 | next ti|me a pix|
|00004e80| 65 6c 20 69 6e 64 65 78 | 20 69 73 20 72 65 71 75 |el index| is requ|
|00004e90| 65 73 74 65 64 2e 0d 54 | 68 65 20 43 6f 6c 6f 72 |ested..T|he Color|
|00004ea0| 20 4d 61 6e 61 67 65 72 | 20 62 75 69 6c 64 73 20 | Manager| builds |
|00004eb0| 6f 72 20 72 65 62 75 69 | 6c 64 73 20 61 6e 20 69 |or rebui|lds an i|
|00004ec0| 6e 76 65 72 73 65 20 74 | 61 62 6c 65 20 69 6e 20 |nverse t|able in |
|00004ed0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6d 61 |the foll|owing ma|
|00004ee0| 6e 6e 65 72 3a 0d 09 31 | 2e 09 49 74 20 62 75 69 |nner:..1|..It bui|
|00004ef0| 6c 64 73 20 61 20 74 61 | 62 6c 65 20 6f 66 20 61 |lds a ta|ble of a|
|00004f00| 6c 6c 20 70 6f 73 73 69 | 62 6c 65 20 52 47 42 20 |ll possi|ble RGB |
|00004f10| 76 61 6c 75 65 73 20 74 | 61 6b 65 6e 20 33 2c 20 |values t|aken 3, |
|00004f20| 34 2c 20 6f 72 20 35 20 | 62 69 74 73 20 61 74 20 |4, or 5 |bits at |
|00004f30| 61 20 74 69 6d 65 2e 0d | 09 32 2e 09 46 6f 72 20 |a time..|.2..For |
|00004f40| 65 61 63 68 20 70 6f 73 | 69 74 69 6f 6e 20 69 6e |each pos|ition in|
|00004f50| 20 74 68 65 20 74 61 62 | 6c 65 2c 20 69 74 20 61 | the tab|le, it a|
|00004f60| 74 74 65 6d 70 74 73 20 | 74 6f 20 66 69 6e 64 20 |ttempts |to find |
|00004f70| 74 68 65 20 63 6c 6f 73 | 65 73 74 20 6d 61 74 63 |the clos|est matc|
|00004f80| 68 2e 0d 09 33 2e 09 49 | 74 20 61 64 64 73 20 69 |h...3..I|t adds i|
|00004f90| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 74 6f 20 67 65 |nformati|on to ge|
|00004fa0| 74 20 61 20 62 65 74 74 | 65 72 20 72 65 73 6f 6c |t a bett|er resol|
|00004fb0| 75 74 69 6f 6e 2e 0d 54 | 68 65 20 43 6f 6c 6f 72 |ution..T|he Color|
|00004fc0| 20 4d 61 6e 61 67 65 72 | 20 62 75 69 6c 64 73 20 | Manager| builds |
|00004fd0| 61 6e 20 69 6e 76 65 72 | 73 65 20 74 61 62 6c 65 |an inver|se table|
|00004fe0| 20 77 69 74 68 20 74 68 | 65 20 4d 61 6b 65 49 54 | with th|e MakeIT|
|00004ff0| 61 62 6c 65 20 70 72 6f | 63 65 64 75 72 65 2c 20 |able pro|cedure, |
|00005000| 77 68 69 63 68 20 6f 6e | 6c 79 20 73 75 70 70 6f |which on|ly suppo|
|00005010| 72 74 73 20 33 2d 62 69 | 74 2c 20 34 2d 62 69 74 |rts 3-bi|t, 4-bit|
|00005020| 2c 20 61 6e 64 20 35 2d | 62 69 74 20 72 65 73 6f |, and 5-|bit reso|
|00005030| 6c 75 74 69 6f 6e 2e 20 | 28 46 69 76 65 20 62 69 |lution. |(Five bi|
|00005040| 74 73 20 69 73 20 74 68 | 65 20 6d 61 78 69 6d 75 |ts is th|e maximu|
|00005050| 6d 20 72 65 73 6f 6c 75 | 74 69 6f 6e 2c 20 62 65 |m resolu|tion, be|
|00005060| 63 61 75 73 65 20 74 68 | 65 20 69 6e 64 65 78 65 |cause th|e indexe|
|00005070| 73 20 69 6e 74 6f 20 61 | 20 36 2d 62 69 74 20 74 |s into a| 6-bit t|
|00005080| 61 62 6c 65 20 77 6f 75 | 6c 64 20 68 61 76 65 20 |able wou|ld have |
|00005090| 74 6f 20 62 65 20 31 38 | 20 62 69 74 73 20 6c 6f |to be 18| bits lo|
|000050a0| 6e 67 2c 20 6d 6f 72 65 | 20 74 68 61 6e 20 61 20 |ng, more| than a |
|000050b0| 66 75 6c 6c 20 77 6f 72 | 64 2e 29 20 49 6e 20 6d |full wor|d.) In m|
|000050c0| 6f 73 74 20 63 61 73 65 | 73 2c 20 77 68 65 6e 20 |ost case|s, when |
|000050d0| 79 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |your app|lication|
|000050e0| 20 73 65 74 73 20 63 6f | 6c 6f 72 73 20 69 6e 20 | sets co|lors in |
|000050f0| 61 20 67 72 61 70 68 69 | 63 73 20 70 6f 72 74 20 |a graphi|cs port |
|00005100| 75 73 69 6e 67 20 74 68 | 65 20 52 47 42 46 6f 72 |using th|e RGBFor|
|00005110| 65 43 6f 6c 6f 72 20 61 | 6e 64 20 52 47 42 42 61 |eColor a|nd RGBBa|
|00005120| 63 6b 43 6f 6c 6f 72 20 | 70 72 6f 63 65 64 75 72 |ckColor |procedur|
|00005130| 65 73 20 6f 72 20 75 73 | 65 73 20 43 6f 70 79 42 |es or us|es CopyB|
|00005140| 69 74 73 20 74 6f 20 74 | 72 61 6e 73 66 65 72 20 |its to t|ransfer |
|00005150| 70 69 78 65 6c 20 6d 61 | 70 73 2c 20 69 6e 76 65 |pixel ma|ps, inve|
|00005160| 72 73 65 20 74 61 62 6c | 65 73 20 6f 66 20 34 20 |rse tabl|es of 4 |
|00005170| 62 69 74 73 2c 20 74 68 | 65 20 64 65 66 61 75 6c |bits, th|e defaul|
|00005180| 74 2c 20 61 72 65 20 73 | 75 66 66 69 63 69 65 6e |t, are s|ufficien|
|00005190| 74 2e 20 49 66 20 79 6f | 75 20 75 73 65 20 61 72 |t. If yo|u use ar|
|000051a0| 69 74 68 6d 65 74 69 63 | 20 74 72 61 6e 73 66 65 |ithmetic| transfe|
|000051b0| 72 20 6d 6f 64 65 73 20 | 77 69 74 68 20 63 6f 6c |r modes |with col|
|000051c0| 6f 72 20 74 61 62 6c 65 | 73 20 74 68 61 74 20 68 |or table|s that h|
|000051d0| 61 76 65 20 63 6c 6f 73 | 65 6c 79 20 73 70 61 63 |ave clos|ely spac|
|000051e0| 65 64 20 63 6f 6c 6f 72 | 73 2c 20 74 68 65 20 73 |ed color|s, the s|
|000051f0| 63 72 65 65 6e 20 61 70 | 70 65 61 72 61 6e 63 65 |creen ap|pearance|
|00005200| 20 6d 61 79 20 62 65 20 | 69 6d 70 72 6f 76 65 64 | may be |improved|
|00005210| 20 62 79 20 73 70 65 63 | 69 66 79 69 6e 67 20 69 | by spec|ifying i|
|00005220| 6e 76 65 72 73 65 20 74 | 61 62 6c 65 73 20 61 74 |nverse t|ables at|
|00005230| 20 35 2d 62 69 74 20 72 | 65 73 6f 6c 75 74 69 6f | 5-bit r|esolutio|
|00005240| 6e 2c 20 77 68 69 63 68 | 20 6d 61 79 20 75 6e 63 |n, which| may unc|
|00005250| 6f 76 65 72 20 73 6f 6d | 65 20 68 69 64 64 65 6e |over som|e hidden|
|00005260| 20 63 6f 6c 6f 72 73 2e | 20 0d 0d 55 73 69 6e 67 | colors.| ..Using|
|00005270| 20 74 68 65 20 43 6f 6c | 6f 72 20 4d 61 6e 61 67 | the Col|or Manag|
|00005280| 65 72 0d 0d 43 6f 6c 6f | 72 20 51 75 69 63 6b 44 |er..Colo|r QuickD|
|00005290| 72 61 77 20 75 73 65 73 | 20 74 68 65 20 43 6f 6c |raw uses| the Col|
|000052a0| 6f 72 20 4d 61 6e 61 67 | 65 72 20 66 6f 72 20 73 |or Manag|er for s|
|000052b0| 65 76 65 72 61 6c 20 74 | 61 73 6b 73 3a 20 74 6f |everal t|asks: to|
|000052c0| 20 64 65 74 65 72 6d 69 | 6e 65 20 74 68 65 20 69 | determi|ne the i|
|000052d0| 6e 64 65 78 20 76 61 6c | 75 65 20 6f 66 20 74 68 |ndex val|ue of th|
|000052e0| 65 20 62 65 73 74 20 6d | 61 70 70 69 6e 67 20 63 |e best m|apping c|
|000052f0| 6f 6c 6f 72 20 61 76 61 | 69 6c 61 62 6c 65 20 69 |olor ava|ilable i|
|00005300| 6e 20 61 20 64 65 76 69 | 63 65 20 43 4c 55 54 2c |n a devi|ce CLUT,|
|00005310| 20 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 20 77 68 | to dete|rmine wh|
|00005320| 65 74 68 65 72 20 61 20 | 73 70 65 63 69 66 69 63 |ether a |specific|
|00005330| 20 52 47 42 20 63 6f 6c | 6f 72 20 65 78 69 73 74 | RGB col|or exist|
|00005340| 73 20 69 6e 20 61 20 43 | 4c 55 54 2c 20 74 6f 20 |s in a C|LUT, to |
|00005350| 63 68 61 6e 67 65 20 74 | 68 65 20 52 47 42 20 63 |change t|he RGB c|
|00005360| 6f 6c 6f 72 20 69 6e 20 | 61 20 43 4c 55 54 20 65 |olor in |a CLUT e|
|00005370| 6e 74 72 79 2c 20 61 6e | 64 20 74 6f 20 66 69 6e |ntry, an|d to fin|
|00005380| 64 20 74 68 65 20 63 6f | 6d 70 6c 65 6d 65 6e 74 |d the co|mplement|
|00005390| 20 6f 66 20 61 20 63 6f | 6c 6f 72 2e 20 43 6f 6c | of a co|lor. Col|
|000053a0| 6f 72 20 51 75 69 63 6b | 44 72 61 77 d5 73 20 75 |or Quick|Draw.s u|
|000053b0| 73 65 20 6f 66 20 74 68 | 65 20 43 6f 6c 6f 72 20 |se of th|e Color |
|000053c0| 4d 61 6e 61 67 65 72 20 | 69 73 20 74 72 61 6e 73 |Manager |is trans|
|000053d0| 70 61 72 65 6e 74 20 74 | 6f 20 6d 6f 73 74 20 61 |parent t|o most a|
|000053e0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 2e 20 0d 54 68 |pplicati|ons. .Th|
|000053f0| 65 20 76 61 73 74 20 6d | 61 6a 6f 72 69 74 79 20 |e vast m|ajority |
|00005400| 6f 66 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 20 |of appli|cations |
|00005410| 64 6f 6e d5 74 20 6e 65 | 65 64 20 74 6f 20 75 73 |don.t ne|ed to us|
|00005420| 65 20 43 6f 6c 6f 72 20 | 4d 61 6e 61 67 65 72 20 |e Color |Manager |
|00005430| 72 6f 75 74 69 6e 65 73 | 20 64 69 72 65 63 74 6c |routines| directl|
|00005440| 79 2e 20 50 61 6c 65 74 | 74 65 20 4d 61 6e 61 67 |y. Palet|te Manag|
|00005450| 65 72 20 72 6f 75 74 69 | 6e 65 73 20 63 61 6e 20 |er routi|nes can |
|00005460| 6d 61 6e 69 70 75 6c 61 | 74 65 20 74 68 65 20 63 |manipula|te the c|
|00005470| 6f 6c 6f 72 73 20 6f 66 | 20 61 6c 6c 20 74 68 65 |olors of| all the|
|00005480| 20 43 4c 55 54 73 20 61 | 74 74 61 63 68 65 64 20 | CLUTs a|ttached |
|00005490| 74 6f 20 61 20 73 79 73 | 74 65 6d 2c 20 61 6e 64 |to a sys|tem, and|
|000054a0| 20 74 68 65 20 50 61 6c | 65 74 74 65 20 4d 61 6e | the Pal|ette Man|
|000054b0| 61 67 65 72 20 74 61 6b | 65 73 20 63 61 72 65 20 |ager tak|es care |
|000054c0| 74 6f 20 6d 69 6e 69 6d | 69 7a 65 20 64 69 73 74 |to minim|ize dist|
|000054d0| 75 72 62 61 6e 63 65 73 | 20 74 6f 20 6f 74 68 65 |urbances| to othe|
|000054e0| 72 20 77 69 6e 64 6f 77 | 73 20 77 68 65 6e 20 79 |r window|s when y|
|000054f0| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00005500| 6e 65 65 64 73 20 74 6f | 20 63 68 61 6e 67 65 20 |needs to| change |
|00005510| 74 68 65 20 76 61 6c 75 | 65 73 20 69 6e 20 6f 6e |the valu|es in on|
|00005520| 65 20 6f 72 20 6d 6f 72 | 65 20 43 4c 55 54 73 2e |e or mor|e CLUTs.|
|00005530| 0d 53 6f 6d 65 20 61 70 | 70 6c 69 63 61 74 69 6f |.Some ap|plicatio|
|00005540| 6e 73 20 6d 61 79 20 6e | 65 65 64 20 74 6f 20 6d |ns may n|eed to m|
|00005550| 6f 64 69 66 79 20 74 68 | 65 20 61 6c 67 6f 72 69 |odify th|e algori|
|00005560| 74 68 6d 73 20 62 79 20 | 77 68 69 63 68 20 74 68 |thms by |which th|
|00005570| 65 20 43 6f 6c 6f 72 20 | 4d 61 6e 61 67 65 72 20 |e Color |Manager |
|00005580| 64 65 74 65 72 6d 69 6e | 65 73 20 74 68 65 20 62 |determin|es the b|
|00005590| 65 73 74 20 6d 61 70 70 | 69 6e 67 20 63 6f 6c 6f |est mapp|ing colo|
|000055a0| 72 20 69 6e 20 61 20 43 | 4c 55 54 20 6f 72 20 69 |r in a C|LUT or i|
|000055b0| 6e 76 65 72 74 73 20 61 | 20 63 6f 6c 6f 72 2e 20 |nverts a| color. |
|000055c0| 41 20 66 65 77 20 61 70 | 70 6c 69 63 61 74 69 6f |A few ap|plicatio|
|000055d0| 6e 73 20 74 68 61 74 20 | 61 72 65 20 64 65 73 69 |ns that |are desi|
|000055e0| 67 6e 65 64 20 74 6f 20 | 72 75 6e 20 69 6e 20 73 |gned to |run in s|
|000055f0| 70 65 63 69 61 6c 69 7a | 65 64 20 65 6e 76 69 72 |pecializ|ed envir|
|00005600| 6f 6e 6d 65 6e 74 73 2c | 20 77 68 65 72 65 20 74 |onments,| where t|
|00005610| 68 65 20 6d 61 63 68 69 | 6e 65 20 69 73 20 64 65 |he machi|ne is de|
|00005620| 64 69 63 61 74 65 64 20 | 74 6f 20 61 20 73 69 6e |dicated |to a sin|
|00005630| 67 6c 65 20 74 61 73 6b | 2c 20 66 6f 72 20 65 78 |gle task|, for ex|
|00005640| 61 6d 70 6c 65 2c 20 6d | 61 79 20 6e 65 65 64 20 |ample, m|ay need |
|00005650| 74 6f 20 64 69 72 65 63 | 74 6c 79 20 6d 6f 64 69 |to direc|tly modi|
|00005660| 66 79 20 61 20 64 65 76 | 69 63 65 20 43 4c 55 54 |fy a dev|ice CLUT|
|00005670| 2e 0d 0d 43 75 73 74 6f | 6d 69 7a 69 6e 67 20 53 |...Custo|mizing S|
|00005680| 65 61 72 63 68 20 50 72 | 6f 63 65 64 75 72 65 73 |earch Pr|ocedures|
|00005690| 0d 0d 53 70 65 63 69 61 | 6c 69 7a 65 64 20 63 6f |..Specia|lized co|
|000056a0| 6c 6f 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |lor appl|ications|
|000056b0| 20 6d 61 79 20 6e 65 65 | 64 20 74 6f 20 6d 6f 64 | may nee|d to mod|
|000056c0| 69 66 79 20 74 68 65 20 | 77 61 79 20 69 6e 20 77 |ify the |way in w|
|000056d0| 68 69 63 68 20 74 68 65 | 20 43 6f 6c 6f 72 20 4d |hich the| Color M|
|000056e0| 61 6e 61 67 65 72 20 64 | 65 74 65 72 6d 69 6e 65 |anager d|etermine|
|000056f0| 73 20 74 68 65 20 62 65 | 73 74 2d 6d 61 70 70 69 |s the be|st-mappi|
|00005700| 6e 67 20 63 6f 6c 6f 72 | 20 69 6e 20 61 20 43 4c |ng color| in a CL|
|00005710| 55 54 2e 20 41 20 63 75 | 73 74 6f 6d 20 73 65 61 |UT. A cu|stom sea|
|00005720| 72 63 68 20 70 72 6f 63 | 65 64 75 72 65 20 79 6f |rch proc|edure yo|
|00005730| 75 20 70 72 6f 76 69 64 | 65 20 63 61 6e 20 69 6d |u provid|e can im|
|00005740| 70 6c 65 6d 65 6e 74 20 | 69 74 73 20 6f 77 6e 20 |plement |its own |
|00005750| 6d 61 70 70 69 6e 67 20 | 72 75 6c 65 73 2e 20 46 |mapping |rules. F|
|00005760| 6f 72 20 69 6e 73 74 61 | 6e 63 65 2c 20 61 20 63 |or insta|nce, a c|
|00005770| 6f 6c 6f 72 2d 73 65 6c | 65 63 74 69 6f 6e 20 61 |olor-sel|ection a|
|00005780| 70 70 6c 69 63 61 74 69 | 6f 6e 20 6d 69 67 68 74 |pplicati|on might|
|00005790| 20 77 61 6e 74 20 74 6f | 20 6d 61 70 20 61 6c 6c | want to| map all|
|000057a0| 20 6c 65 76 65 6c 73 20 | 6f 66 20 67 72 65 65 6e | levels |of green|
|000057b0| 20 74 6f 20 61 20 73 69 | 6e 67 6c 65 20 67 72 65 | to a si|ngle gre|
|000057c0| 65 6e 20 6f 6e 20 61 20 | 6d 6f 6e 69 74 6f 72 2e |en on a |monitor.|
|000057d0| 20 0d 54 6f 20 64 6f 20 | 74 68 69 73 2c 20 79 6f | .To do |this, yo|
|000057e0| 75 20 77 72 69 74 65 20 | 79 6f 75 72 20 6f 77 6e |u write |your own|
|000057f0| 20 63 6f 6c 6f 72 20 73 | 65 61 72 63 68 20 66 75 | color s|earch fu|
|00005800| 6e 63 74 69 6f 6e 20 61 | 6e 64 20 75 73 65 20 74 |nction a|nd use t|
|00005810| 68 65 20 41 64 64 53 65 | 61 72 63 68 20 70 72 6f |he AddSe|arch pro|
|00005820| 63 65 64 75 72 65 20 74 | 6f 20 69 6e 73 74 61 6c |cedure t|o instal|
|00005830| 6c 20 69 74 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |l it in |the list|
|00005840| 20 6f 66 20 73 65 61 72 | 63 68 20 70 72 6f 63 65 | of sear|ch proce|
|00005850| 64 75 72 65 73 20 74 68 | 61 74 20 74 68 65 20 43 |dures th|at the C|
|00005860| 6f 6c 6f 72 20 4d 61 6e | 61 67 65 72 20 6d 61 69 |olor Man|ager mai|
|00005870| 6e 74 61 69 6e 73 2e 20 | 54 68 65 6e 20 77 68 65 |ntains. |Then whe|
|00005880| 6e 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |n your a|pplicati|
|00005890| 6f 6e 20 6f 72 20 43 6f | 6c 6f 72 20 51 75 69 63 |on or Co|lor Quic|
|000058a0| 6b 44 72 61 77 20 63 61 | 6c 6c 73 20 74 68 65 20 |kDraw ca|lls the |
|000058b0| 43 6f 6c 6f 72 54 6f 49 | 6e 64 65 78 20 66 75 6e |ColorToI|ndex fun|
|000058c0| 63 74 69 6f 6e 2c 20 74 | 68 65 20 63 6f 6c 6f 72 |ction, t|he color|
|000058d0| 20 4d 61 6e 61 67 65 72 | 20 63 61 6c 6c 73 20 6f | Manager| calls o|
|000058e0| 6e 20 79 6f 75 72 20 73 | 65 61 72 63 68 20 72 6f |n your s|earch ro|
|000058f0| 75 74 69 6e 65 20 74 6f | 20 66 69 6e 64 20 61 6e |utine to| find an|
|00005900| 64 20 72 65 74 75 72 6e | 20 74 68 65 20 69 6e 64 |d return| the ind|
|00005910| 65 78 20 66 6f 72 20 74 | 68 65 20 62 65 73 74 2d |ex for t|he best-|
|00005920| 6d 61 70 70 69 6e 67 20 | 63 6f 6c 6f 72 2e 20 59 |mapping |color. Y|
|00005930| 6f 75 72 20 66 75 6e 63 | 74 69 6f 6e 20 73 68 6f |our func|tion sho|
|00005940| 75 6c 64 20 62 65 20 64 | 65 66 69 6e 65 64 20 61 |uld be d|efined a|
|00005950| 73 3a 0d 46 55 4e 43 54 | 49 4f 4e 20 4d 79 53 65 |s:.FUNCT|ION MySe|
|00005960| 61 72 63 68 50 72 6f 63 | 20 28 56 41 52 20 72 67 |archProc| (VAR rg|
|00005970| 62 3a 20 52 47 42 43 6f | 6c 6f 72 3b 20 56 41 52 |b: RGBCo|lor; VAR|
|00005980| 20 70 6f 73 69 74 69 6f | 6e 3a 20 4c 6f 6e 67 49 | positio|n: LongI|
|00005990| 6e 74 29 3a 0d 09 09 09 | 09 09 09 09 42 6f 6f 6c |nt):....|....Bool|
|000059a0| 65 61 6e 3b 0d 49 66 20 | 79 6f 75 72 20 73 65 61 |ean;.If |your sea|
|000059b0| 72 63 68 20 66 75 6e 63 | 74 69 6f 6e 20 64 65 63 |rch func|tion dec|
|000059c0| 69 64 65 73 20 74 6f 20 | 61 63 74 20 6f 6e 20 74 |ides to |act on t|
|000059d0| 68 65 20 63 6f 6c 6f 72 | 2c 20 69 74 20 72 65 74 |he color|, it ret|
|000059e0| 75 72 6e 73 20 74 68 65 | 20 69 6e 64 65 78 20 6f |urns the| index o|
|000059f0| 66 20 74 68 65 20 64 65 | 73 69 72 65 64 20 63 6f |f the de|sired co|
|00005a00| 6c 6f 72 20 69 6e 20 74 | 68 65 20 70 6f 73 69 74 |lor in t|he posit|
|00005a10| 69 6f 6e 20 70 61 72 61 | 6d 65 74 65 72 2c 20 61 |ion para|meter, a|
|00005a20| 6e 64 20 72 65 74 75 72 | 6e 73 20 54 52 55 45 20 |nd retur|ns TRUE |
|00005a30| 66 6f 72 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |for the |function|
|00005a40| 20 76 61 6c 75 65 2e 20 | 4f 74 68 65 72 77 69 73 | value. |Otherwis|
|00005a50| 65 2c 20 69 74 20 73 68 | 6f 75 6c 64 20 72 65 74 |e, it sh|ould ret|
|00005a60| 75 72 6e 20 46 41 4c 53 | 45 20 61 73 20 74 68 65 |urn FALS|E as the|
|00005a70| 20 66 75 6e 63 74 69 6f | 6e 20 76 61 6c 75 65 2c | functio|n value,|
|00005a80| 20 61 6e 64 20 70 61 73 | 73 20 74 68 65 20 69 6e | and pas|s the in|
|00005a90| 70 75 74 20 63 6f 6c 6f | 72 20 62 61 63 6b 20 74 |put colo|r back t|
|00005aa0| 6f 20 74 68 65 20 43 6f | 6c 6f 72 20 4d 61 6e 61 |o the Co|lor Mana|
|00005ab0| 67 65 72 20 69 6e 20 74 | 68 65 20 72 67 62 20 70 |ger in t|he rgb p|
|00005ac0| 61 72 61 6d 65 74 65 72 | 2e 20 54 68 65 20 43 6f |arameter|. The Co|
|00005ad0| 6c 6f 72 20 4d 61 6e 61 | 67 65 72 20 74 68 65 6e |lor Mana|ger then|
|00005ae0| 20 6c 6f 6f 6b 73 20 74 | 6f 20 74 68 65 20 6e 65 | looks t|o the ne|
|00005af0| 78 74 20 73 65 61 72 63 | 68 20 70 72 6f 63 65 64 |xt searc|h proced|
|00005b00| 75 72 65 20 69 6e 20 74 | 68 65 20 6c 69 73 74 2c |ure in t|he list,|
|00005b10| 20 61 6e 64 20 69 66 20 | 74 68 65 72 65 20 61 72 | and if |there ar|
|00005b20| 65 20 6e 6f 20 6f 74 68 | 65 72 20 63 75 73 74 6f |e no oth|er custo|
|00005b30| 6d 20 70 72 6f 63 65 64 | 75 72 65 73 20 69 74 20 |m proced|ures it |
|00005b40| 75 73 65 73 20 74 68 65 | 20 6e 6f 72 6d 61 6c 20 |uses the| normal |
|00005b50| 69 6e 76 65 72 73 65 20 | 74 61 62 6c 65 20 6d 65 |inverse |table me|
|00005b60| 63 68 61 6e 69 73 6d 2e | 0d 54 68 65 20 70 72 6f |chanism.|.The pro|
|00005b70| 63 65 64 75 72 65 73 20 | 61 72 65 20 63 68 61 69 |cedures |are chai|
|00005b80| 6e 20 65 6c 65 6d 65 6e | 74 73 20 69 6e 20 61 20 |n elemen|ts in a |
|00005b90| 6c 69 6e 6b 65 64 20 6c | 69 73 74 20 62 65 67 69 |linked l|ist begi|
|00005ba0| 6e 6e 69 6e 67 20 69 6e | 20 74 68 65 20 67 64 53 |nning in| the gdS|
|00005bb0| 65 61 72 63 68 50 72 6f | 63 20 66 69 65 6c 64 20 |earchPro|c field |
|00005bc0| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 47 |of the c|urrent G|
|00005bd0| 44 65 76 69 63 65 20 72 | 65 63 6f 72 64 2e 20 45 |Device r|ecord. E|
|00005be0| 61 63 68 20 6c 69 6e 6b | 20 69 73 20 61 6e 20 53 |ach link| is an S|
|00005bf0| 50 72 6f 63 52 65 63 20 | 72 65 63 6f 72 64 2c 20 |ProcRec |record, |
|00005c00| 77 68 69 63 68 20 68 61 | 73 20 74 68 65 20 66 6f |which ha|s the fo|
|00005c10| 72 6d 61 74 20 73 68 6f | 77 6e 20 62 65 6c 6f 77 |rmat sho|wn below|
|00005c20| 2e 0d 54 59 50 45 0d 09 | 53 50 72 6f 63 52 65 63 |..TYPE..|SProcRec|
|00005c30| 09 09 09 3d 20 0d 09 09 | 52 45 43 4f 52 44 0d 09 |...= ...|RECORD..|
|00005c40| 09 09 6e 78 74 53 72 63 | 68 3a 20 53 50 72 6f 63 |..nxtSrc|h: SProc|
|00005c50| 48 6e 64 6c 3b 09 09 09 | 09 09 09 09 7b 68 61 6e |Hndl;...|....{han|
|00005c60| 64 6c 65 20 74 6f 20 6e | 65 78 74 20 73 50 72 6f |dle to n|ext sPro|
|00005c70| 63 52 65 63 7d 0d 09 09 | 09 73 72 63 68 50 72 6f |cRec}...|.srchPro|
|00005c80| 63 3a 50 72 6f 63 50 74 | 72 09 09 09 09 09 09 09 |c:ProcPt|r.......|
|00005c90| 7b 70 6f 69 6e 74 65 72 | 20 74 6f 20 73 65 61 72 |{pointer| to sear|
|00005ca0| 63 68 20 70 72 6f 63 65 | 64 75 72 65 7d 0d 09 09 |ch proce|dure}...|
|00005cb0| 45 4e 44 0d 54 68 65 20 | 43 6f 6c 6f 72 20 4d 61 |END.The |Color Ma|
|00005cc0| 6e 61 67 65 72 20 70 72 | 6f 76 69 64 65 73 20 72 |nager pr|ovides r|
|00005cd0| 6f 75 74 69 6e 65 73 20 | 74 6f 20 61 64 64 20 61 |outines |to add a|
|00005ce0| 6e 64 20 64 65 6c 65 74 | 65 20 63 75 73 74 6f 6d |nd delet|e custom|
|00005cf0| 20 70 72 6f 63 65 64 75 | 72 65 73 20 66 72 6f 6d | procedu|res from|
|00005d00| 20 74 68 65 20 6c 69 6e | 6b 65 64 20 6c 69 73 74 | the lin|ked list|
|00005d10| 2e 20 59 6f 75 20 63 61 | 6e 20 69 6e 73 74 61 6c |. You ca|n instal|
|00005d20| 6c 20 61 6e 79 20 6e 75 | 6d 62 65 72 20 6f 66 20 |l any nu|mber of |
|00005d30| 73 65 61 72 63 68 20 70 | 72 6f 63 65 64 75 72 65 |search p|rocedure|
|00005d40| 73 20 69 6e 20 74 68 65 | 20 6c 69 73 74 2e 20 54 |s in the| list. T|
|00005d50| 68 65 20 43 6f 6c 6f 72 | 20 4d 61 6e 61 67 65 72 |he Color| Manager|
|00005d60| 20 67 69 76 65 73 20 65 | 61 63 68 20 70 72 6f 63 | gives e|ach proc|
|00005d70| 65 64 75 72 65 20 74 68 | 65 20 63 68 61 6e 63 65 |edure th|e chance|
|00005d80| 20 74 6f 20 61 63 74 20 | 6f 72 20 70 61 73 73 20 | to act |or pass |
|00005d90| 6f 6e 20 74 68 65 20 63 | 6f 6c 6f 72 20 75 6e 74 |on the c|olor unt|
|00005da0| 69 6c 20 6f 6e 65 20 72 | 65 74 75 72 6e 73 20 54 |il one r|eturns T|
|00005db0| 52 55 45 2e 20 53 69 6e | 63 65 20 65 61 63 68 20 |RUE. Sin|ce each |
|00005dc0| 64 65 76 69 63 65 20 69 | 73 20 61 20 73 68 61 72 |device i|s a shar|
|00005dd0| 65 64 20 72 65 73 6f 75 | 72 63 65 2c 20 79 6f 75 |ed resou|rce, you|
|00005de0| 20 63 61 6e 20 75 73 65 | 20 74 68 65 20 53 65 74 | can use| the Set|
|00005df0| 43 6c 69 65 6e 74 49 44 | 20 70 72 6f 63 65 64 75 |ClientID| procedu|
|00005e00| 72 65 20 74 6f 20 73 65 | 74 20 74 68 65 20 67 64 |re to se|t the gd|
|00005e10| 49 44 20 66 69 65 6c 64 | 20 6f 66 20 74 68 65 20 |ID field| of the |
|00005e20| 47 44 65 76 69 63 65 20 | 72 65 63 6f 72 64 20 74 |GDevice |record t|
|00005e30| 6f 20 69 64 65 6e 74 69 | 66 79 20 79 6f 75 72 20 |o identi|fy your |
|00005e40| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 61 73 20 74 |applicat|ion as t|
|00005e50| 68 65 20 63 61 6c 6c 65 | 72 20 74 6f 20 79 6f 75 |he calle|r to you|
|00005e60| 72 20 73 65 61 72 63 68 | 20 70 72 6f 63 65 64 75 |r search| procedu|
|00005e70| 72 65 73 2e 20 57 68 65 | 6e 20 79 6f 75 72 20 61 |res. Whe|n your a|
|00005e80| 70 70 6c 69 63 61 74 69 | 6f 6e 20 69 73 20 66 69 |pplicati|on is fi|
|00005e90| 6e 69 73 68 65 64 20 6d | 61 70 70 69 6e 67 20 63 |nished m|apping c|
|00005ea0| 6f 6c 6f 72 73 2c 20 69 | 74 20 73 68 6f 75 6c 64 |olors, i|t should|
|00005eb0| 20 72 65 6d 6f 76 65 20 | 79 6f 75 72 20 63 75 73 | remove |your cus|
|00005ec0| 74 6f 6d 20 73 65 61 72 | 63 68 20 70 72 6f 63 65 |tom sear|ch proce|
|00005ed0| 64 75 72 65 2c 20 62 79 | 20 63 61 6c 6c 69 6e 67 |dure, by| calling|
|00005ee0| 20 74 68 65 20 44 65 6c | 53 65 61 72 63 68 20 70 | the Del|Search p|
|00005ef0| 72 6f 63 65 64 75 72 65 | 2e 0d 46 6f 72 20 65 78 |rocedure|..For ex|
|00005f00| 61 6d 70 6c 65 2c 20 4c | 69 73 74 69 6e 67 20 31 |ample, L|isting 1|
|00005f10| 2d 31 20 73 68 6f 77 73 | 20 61 20 70 72 6f 63 65 |-1 shows| a proce|
|00005f20| 64 75 72 65 20 74 68 61 | 74 20 61 64 64 73 20 61 |dure tha|t adds a|
|00005f30| 20 63 75 73 74 6f 6d 20 | 73 65 61 72 63 68 20 70 | custom |search p|
|00005f40| 72 6f 63 65 64 75 72 65 | 20 62 65 66 6f 72 65 20 |rocedure| before |
|00005f50| 64 72 61 77 69 6e 67 20 | 77 69 74 68 20 61 20 75 |drawing |with a u|
|00005f60| 73 65 72 2d 73 75 70 70 | 6c 69 65 64 20 52 47 42 |ser-supp|lied RGB|
|00005f70| 20 63 6f 6c 6f 72 2e 0d | 0d 4c 69 73 74 69 6e 67 | color..|.Listing|
|00005f80| 20 31 2d 31 09 41 64 64 | 69 6e 67 20 61 6e 64 20 | 1-1.Add|ing and |
|00005f90| 75 73 69 6e 67 20 61 20 | 63 75 73 74 6f 6d 20 73 |using a |custom s|
|00005fa0| 65 61 72 63 68 20 70 72 | 6f 63 65 64 75 72 65 0d |earch pr|ocedure.|
|00005fb0| 0d 50 72 6f 63 65 64 75 | 72 65 20 44 72 61 77 55 |.Procedu|re DrawU|
|00005fc0| 73 65 72 43 6f 6c 6f 72 | 3b 0d 56 41 52 09 09 0d |serColor|;.VAR...|
|00005fd0| 09 4d 79 43 6f 6c 6f 72 | 53 65 61 72 63 68 09 09 |.MyColor|Search..|
|00005fe0| 09 09 3a 09 50 72 6f 63 | 50 74 72 3b 0d 09 55 73 |..:.Proc|Ptr;..Us|
|00005ff0| 65 72 43 6f 6c 6f 72 09 | 09 09 09 3a 09 52 47 42 |erColor.|...:.RGB|
|00006000| 43 6f 6c 6f 72 3b 0d 09 | 73 61 6d 70 6c 65 52 65 |Color;..|sampleRe|
|00006010| 63 74 09 09 09 09 3a 09 | 52 65 63 74 3b 0d 42 45 |ct....:.|Rect;.BE|
|00006020| 47 49 4e 0d 09 41 64 64 | 53 65 61 72 63 68 20 28 |GIN..Add|Search (|
|00006030| 4d 79 43 6f 6c 6f 72 53 | 65 61 72 63 68 29 3b 0d |MyColorS|earch);.|
|00006040| 09 52 47 42 46 6f 72 65 | 43 6f 6c 6f 72 28 55 73 |.RGBFore|Color(Us|
|00006050| 65 72 43 6f 6c 6f 72 29 | 3b 0d 09 44 72 61 77 52 |erColor)|;..DrawR|
|00006060| 65 63 74 20 28 53 61 6d | 70 6c 65 52 65 63 74 29 |ect (Sam|pleRect)|
|00006070| 3b 0d 09 44 65 6c 53 65 | 61 72 63 68 20 28 4d 79 |;..DelSe|arch (My|
|00006080| 43 6f 6c 6f 72 53 65 61 | 72 63 68 29 3b 0d 45 4e |ColorSea|rch);.EN|
|00006090| 44 3b 0d 54 68 65 20 4d | 79 43 6f 6c 6f 72 53 65 |D;.The M|yColorSe|
|000060a0| 61 72 63 68 20 70 72 6f | 63 65 64 75 72 65 20 63 |arch pro|cedure c|
|000060b0| 6f 75 6c 64 20 65 6e 74 | 69 72 65 6c 79 20 72 65 |ould ent|irely re|
|000060c0| 70 6c 61 63 65 20 74 68 | 65 20 43 6f 6c 6f 72 20 |place th|e Color |
|000060d0| 4d 61 6e 61 67 65 72 d5 | 73 20 73 65 61 72 63 68 |Manager.|s search|
|000060e0| 20 61 6c 67 6f 72 69 74 | 68 6d 20 62 79 20 61 63 | algorit|hm by ac|
|000060f0| 63 65 70 74 69 6e 67 20 | 74 68 65 20 52 47 42 43 |cepting |the RGBC|
|00006100| 6f 6c 6f 72 20 72 65 63 | 6f 72 64 2c 20 64 6f 69 |olor rec|ord, doi|
|00006110| 6e 67 20 61 20 73 65 61 | 72 63 68 2c 20 61 6e 64 |ng a sea|rch, and|
|00006120| 20 74 68 65 6e 20 72 65 | 74 75 72 6e 69 6e 67 20 | then re|turning |
|00006130| 74 68 65 20 69 6e 64 65 | 78 20 76 61 6c 75 65 20 |the inde|x value |
|00006140| 61 6e 64 20 54 52 55 45 | 2e 20 49 74 20 63 6f 75 |and TRUE|. It cou|
|00006150| 6c 64 20 61 6c 73 6f 20 | 6d 65 72 65 6c 79 20 6d |ld also |merely m|
|00006160| 6f 64 69 66 79 20 74 68 | 65 20 63 6f 6c 6f 72 20 |odify th|e color |
|00006170| 61 6e 64 20 74 68 65 6e | 20 6c 65 74 20 74 68 65 |and then| let the|
|00006180| 20 43 6f 6c 6f 72 20 4d | 61 6e 61 67 65 72 20 70 | Color M|anager p|
|00006190| 65 72 66 6f 72 6d 20 69 | 74 73 20 69 6e 76 65 72 |erform i|ts inver|
|000061a0| 73 65 20 74 61 62 6c 65 | 20 6c 6f 6f 6b 75 70 2e |se table| lookup.|
|000061b0| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | For exa|mple, th|
|000061c0| 65 20 4d 79 43 6f 6c 6f | 72 53 65 61 72 63 68 20 |e MyColo|rSearch |
|000061d0| 70 72 6f 63 65 64 75 72 | 65 20 63 6f 75 6c 64 20 |procedur|e could |
|000061e0| 61 63 63 65 70 74 20 74 | 68 65 20 52 47 42 43 6f |accept t|he RGBCo|
|000061f0| 6c 6f 72 2c 20 64 6f 20 | 61 6e 20 61 72 69 74 68 |lor, do |an arith|
|00006200| 6d 65 74 69 63 20 61 64 | 64 20 77 69 74 68 20 61 |metic ad|d with a|
|00006210| 20 67 72 61 79 20 63 6f | 6c 6f 72 20 74 6f 20 6c | gray co|lor to l|
|00006220| 69 67 68 74 65 6e 20 61 | 6c 6c 20 74 68 72 65 65 |ighten a|ll three|
|00006230| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 2c 20 61 6e 64 | compone|nts, and|
|00006240| 20 74 68 65 6e 20 72 65 | 74 75 72 6e 20 74 68 65 | then re|turn the|
|00006250| 20 52 47 42 43 6f 6c 6f | 72 20 72 65 63 6f 72 64 | RGBColo|r record|
|00006260| 20 69 6e 20 74 68 65 20 | 72 67 62 20 56 41 52 20 | in the |rgb VAR |
|00006270| 70 61 72 61 6d 65 74 65 | 72 20 61 6e 64 20 72 65 |paramete|r and re|
|00006280| 74 75 72 6e 20 46 41 4c | 53 45 20 61 73 20 74 68 |turn FAL|SE as th|
|00006290| 65 20 66 75 6e 63 74 69 | 6f 6e 20 76 61 6c 75 65 |e functi|on value|
|000062a0| 2e 20 54 68 65 20 43 6f | 6c 6f 72 20 4d 61 6e 61 |. The Co|lor Mana|
|000062b0| 67 65 72 20 74 68 65 6e | 20 75 73 65 73 20 74 68 |ger then| uses th|
|000062c0| 65 20 72 65 74 75 72 6e | 65 64 20 52 47 42 20 63 |e return|ed RGB c|
|000062d0| 6f 6c 6f 72 20 61 73 20 | 74 68 65 20 69 6e 70 75 |olor as |the inpu|
|000062e0| 74 20 66 6f 72 20 69 74 | 73 20 64 65 66 61 75 6c |t for it|s defaul|
|000062f0| 74 20 73 65 61 72 63 68 | 2e 0d 0d 43 75 73 74 6f |t search|...Custo|
|00006300| 6d 69 7a 69 6e 67 20 43 | 6f 6d 70 6c 65 6d 65 6e |mizing C|omplemen|
|00006310| 74 20 50 72 6f 63 65 64 | 75 72 65 73 0d 0d 53 6f |t Proced|ures..So|
|00006320| 6d 65 20 73 70 65 63 69 | 61 6c 69 7a 65 64 20 63 |me speci|alized c|
|00006330| 6f 6c 6f 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |olor app|lication|
|00006340| 73 20 6d 61 79 20 6e 65 | 65 64 20 74 6f 20 6d 6f |s may ne|ed to mo|
|00006350| 64 69 66 79 20 74 68 65 | 20 77 61 79 20 69 6e 20 |dify the| way in |
|00006360| 77 68 69 63 68 20 74 68 | 65 20 43 6f 6c 6f 72 20 |which th|e Color |
|00006370| 4d 61 6e 61 67 65 72 20 | 63 61 6c 63 75 6c 61 74 |Manager |calculat|
|00006380| 65 73 20 74 68 65 20 69 | 6e 76 65 72 73 65 2c 20 |es the i|nverse, |
|00006390| 6f 72 20 63 6f 6d 70 6c | 65 6d 65 6e 74 2c 20 6f |or compl|ement, o|
|000063a0| 66 20 61 20 63 6f 6c 6f | 72 2e 20 54 68 65 20 43 |f a colo|r. The C|
|000063b0| 6f 6c 6f 72 20 4d 61 6e | 61 67 65 72 d5 73 20 64 |olor Man|ager.s d|
|000063c0| 65 66 61 75 6c 74 20 6d | 65 74 68 6f 64 20 66 6f |efault m|ethod fo|
|000063d0| 72 20 69 6e 76 65 72 74 | 69 6e 67 20 61 20 63 6f |r invert|ing a co|
|000063e0| 6c 6f 72 20 69 73 20 74 | 6f 20 69 6e 76 65 72 74 |lor is t|o invert|
|000063f0| 20 74 68 65 20 62 69 74 | 20 76 61 6c 75 65 73 20 | the bit| values |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.